Skip to main content

Numerical Geometric Algebra Module

Project description

clifford: Geometric Algebra for Python

PyPI DOI Binder Documentation Status Build Status Build Status codecov

clifford is a numerical Geometric Algebra (a.k.a. Clifford algebra) package for python.

Geometric Algebra (GA) is a universal algebra which among several other independent mathematical systems, subsumes:

  • Complex numbers
  • Quaternions
  • Linear algebra

Scalars, vectors, and higher-grade entities can be mixed freely and consistently in the form of mixed-grade multivectors. Like this,

Visual explanation of blades

Quick Installation

Requires Python version >=3.5

Install using conda:

conda install clifford -c conda-forge

Install using pip:

pip3 install clifford

Detailed instructions

Quickstart

Try out a notebook in binder

Or have a go on your own pc:

from clifford.g3 import *  # import GA for 3D space
from math import e, pi
a = e1 + 2*e2 + 3*e3 # vector 
R = e**(pi/4*e12)    # rotor 
R*a*~R    # rotate the vector  

Syntax Summary

Syntax Operation
| Symmetric inner product
<< Left contraction
^ Outer product
* Geometric product
X(i) Return the section of the multivector X of grade i
X(ei) Return the section of the multivector X for which ei is the pseudo scalar
X[i] Return the i'th coefficient from the multivector X
X.normal() Return the normalised multivector so that X*~X is +- 1

For installation instructions, api documention, and tutorials, head over to our documentation!

Citing This Library

For citation information, see our CITATION.md file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clifford-1.5.1.tar.gz (139.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clifford-1.5.1-py3-none-any.whl (160.0 kB view details)

Uploaded Python 3

File details

Details for the file clifford-1.5.1.tar.gz.

File metadata

  • Download URL: clifford-1.5.1.tar.gz
  • Upload date:
  • Size: 139.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clifford-1.5.1.tar.gz
Algorithm Hash digest
SHA256 3484b312cff0e2d5e14fb99409b8242193c358dfaa6af7bc6ea230c4606e66f3
MD5 090a0474bc6951dff4d1709977c1a7af
BLAKE2b-256 a614637c81fb1536e9e2ad75508c6df54131e72025b25fc3360cd865ea093877

See more details on using hashes here.

File details

Details for the file clifford-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: clifford-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 160.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clifford-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9e35d5695285c2bd2234d915bbd84dc133a5bf487c42f36f13e99523735993d
MD5 fd1bc77feade7b2483f2650edd7072d7
BLAKE2b-256 f813fa78ea812bdef6699df70c22cf49a6491f801ec653bf02da8f26b611637b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page