clifford (clifford)¶

The top-level module. Provides two core classes, Layout and MultiVector, along with several helper functions to implement the algebras.

Constructing algebras¶

Note that typically the Predefined Algebras are sufficient, and there is no need to build an algebra from scratch.

 Cl([p, q, r, sig, names, firstIdx, mvClass]) Returns a Layout and basis blade MultiVectors for the geometric algebra $$Cl_{p,q,r}$$. conformalize(layout[, added_sig, mvClass]) Conformalize a Geometric Algebra

Whether you construct your algebras from scratch, or use the predefined ones, you’ll end up working with the following types:

 MultiVector(layout[, value, string]) An element of the algebra Layout(sig, *[, ids, order, names]) Layout stores information regarding the geometric algebra itself and the internal representation of multivectors. ConformalLayout(*args[, layout]) A layout for a conformal algebra, which adds extra constants and helpers.

It is unlikely you will need these features, but they remain as a better spelling for features which have always been in clifford.

 BasisBladeOrder(bitmaps) Represents the storage order in memory of basis blade coefficients. BasisVectorIds(blade_ids) Stores ids for the ordered set of basis vectors, typically integers.

Global configuration functions¶

These functions are used to change the global behavior of clifford.

clifford.eps(newEps=None)[source]

Get/Set the epsilon for float comparisons.

clifford.pretty(precision=None)[source]

Makes repr(MultiVector) default to pretty-print.

precision arg can be used to set the printed precision.

Parameters

precision (int) – number of sig figs to print past decimal

Examples

>>> pretty(5)

clifford.ugly()[source]

Makes repr(MultiVector) default to eval-able representation.

clifford.print_precision(newVal)[source]

Set the epsilon for float comparisons.

Parameters

newVal (int) – number of sig figs to print (see builtin round)

Examples

>>> print_precision(5)


Miscellaneous classes¶

 MVArray(input_array) MultiVector Array Frame(input_array) A frame of vectors BladeMap(blades_map[, map_scalars]) A Map Relating Blades in two different algebras

Miscellaneous functions¶

 grade_obj(objin[, threshold]) Returns the modal grade of a multivector randomMV(layout[, min, max, grades, …]) n Random MultiVectors with given layout.