clifford: Geometric Algebra for Python
clifford is a numerical Geometric Algebra (a.k.a. Clifford algebra) package for python.
- Documentation: http://clifford.readthedocs.org
- Source code: https://github.com/pygae/clifford
- Bug reports: https://github.com/pygae/clifford/issues
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,
Quick Installation
Requires Python version >=3.5
Install using conda:
conda install clifford -c conda-forge
Install using pip:
pip3 install clifford
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.
Metadata
Release files for clifford 1.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| clifford-1.5.1.tar.gz | 139.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clifford-1.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 299.3 kB
Release files / clifford-1.5.1.tar.gz
| Download URL | clifford-1.5.1.tar.gz |
|---|---|
| Size | 139.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3484b312cff0e2d5e14fb99409b8242193c358dfaa6af7bc6ea230c4606e66f3
|
|
BLAKE2b-256 checksum How to use checksums |
a614637c81fb1536e9e2ad75508c6df54131e72025b25fc3360cd865ea093877
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / clifford-1.5.1-py3-none-any.whl
| Download URL | clifford-1.5.1-py3-none-any.whl |
|---|---|
| Size | 160.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9e35d5695285c2bd2234d915bbd84dc133a5bf487c42f36f13e99523735993d
|
|
BLAKE2b-256 checksum How to use checksums |
f813fa78ea812bdef6699df70c22cf49a6491f801ec653bf02da8f26b611637b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|