Changes in 1.4.x

  • Python 3.9 is officially supported.

  • MultiVector is now supported directly within @numba.njited code. See the documentation for this feature in the clifford.numba module for more details.

  • New algorithms for the multivector inverse MultiVector.inv():

    • Inverting a non-blade multivector in algebras where \(p = q \le 5\) now falls back on the approach described in [HS17] instead of using a linear algebra approach. This algorithm can be used directly via MultiVector.hitzer_inverse().

    • An additional method is available, MultiVector.shirokov_inverse(), which is the arbitrary signature algorithm described in [Shi20].

  • A new clifford.taylor_expansions module for Taylor series of various multivector functions, starting with common trigonometric functions. These functions are additionally exposed via methods on MultiVector like MultiVector.cos().

  • Random functions now accept an rng keyword argument that accepts the object returned by numpy.random.default_rng(), for deterministic randomness.

  • Projection using MultiVector.__call__() as mv(grade) no longer raises ValueError for grades not present in the algebra, and instead just returns zero.

  • Some JIT-ed code is now cached when clifford is imported for the very first time, speeding up subsequent imports.

  • Improved citations in the documentation.

Bugs fixed

  • Where possible, MultiVectors preserve their data type in the dual, and the right and left complements.

  • MVArray no longer errantly promotes 0-dimensional arrays to 1-dimensional arrays.

  • MultiVectors with complex coefficients are now printed correctly.

  • cga.Round.radius() is no longer always 1.

Compatibility notes

  • This will be the last release to support Python 3.5 and 3.6, as the former reached its end-of-life during our last release cycle, and the latter is expected to before our next release.

  • clifford.general_exp() is deprecated in favor of clifford.taylor_expansions.exp(), although typically clifford.MultiVector.exp() is a better choice

  • Transparently treating a MultiVector as a flat array of coefficients is deprecated, and so mv[i] and len(mv) both emit DeprecationWarnings. If the underlying storage order is of interest, use mv.value[i] and len(mv) respectively. To obtain the scalar part of a MultiVector, use mv[()] instead of mv[0].

  • Layout.gradeList has been removed. If still needed, it can be recovered as an ndarray isntead of a list via the private attribute layout._basis_blade_order.grades (BasisBladeOrder.grades).

Changes in 1.3.x

Bugs fixed

Compatibility notes

  • clifford.grades_present is deprecated in favor of MultiVector.grades(), the latter of which now takes an eps argument.

  • del mv[i] is no longer legal, the equivalent mv[i] = 0 should be used instead.

  • Layout.dict_to_multivector has been removed. It was accidentally broken in 1.0.5, so there is little point deprecating it.

  • Layout.basis_names() now returns a list of str, rather than a numpy array of bytes. The result now matches the construction order, rather than being sorted alphabetically. The order of Layout.metric() has been adjusted for consistency.

  • The imt_prod_mask, omt_prod_mask, and lcmt_prod_mask attributes of Layout objects have been removed, as these were an unnecessary intermediate computation that had no need to be public.

  • Some functions in have been renamed:

  • While this release is compatible with numba version 0.49.0, it is recommended to use 0.48.0 which does not emit as many warnings. See the Installation instructions for how to follow this guidance.

Patch releases

  • 1.3.1: Added compatibility with numba version 0.50.0.

Changes in 1.2.x

Bugs fixed

Compatibility notes

Changes in 1.1.x

  • Restores layout.gmt, Layout.omt, Layout.imt, and Layout.lcmt. A few releases ago, these existed but were dense. For memory reasons, they were then removed entirely. They have now been reinstated as sparse.COO matrix objects, which behave much the same as the original dense arrays.

  • MultiVectors preserve their data type in addition, subtraction, and products. This means that integers remain integers until combined with floats. Note that this means in principle integer overflow is possible, so working with floats is still recommended. This also adds support for floating point types of other precision, such as np.float32.

  • is now configured such that pip2 install clifford will not attempt to download this version, since it does not work at all on python 2.

  • Documentation now includes examples of pyganja visualizations.

Compatibility notes

  • Layout.blades() now includes the scalar 1, as do other similar functions.

  • MultiVector.grades() now returns a set not a list. This means code like mv.grades() == [0] will need to change to mv.grades() == {0}, or to work both before and after this change, set(mv.grades()) == {0}.

Bugs fixed

  • mv[(i, j)] would sometimes fail if the indices were not in canonical order.

  • mv == None and layout == None would crash rather than return False.

  • blade.isVersor() would return False.

  • layout.blades_of_grade(0) would not return the list it claimed to return.

Internal changes

  • Switch to pytest for testing.

  • Enable code coverage.

  • Split into smaller files.

  • Remove python 2 compatibility code, which already no longer worked.

Changes 0.6-0.7

  • Added a real license.

  • Convert to NumPy instead of Numeric.

Changes 0.5-0.6

  • join() and meet() actually work now, but have numerical accuracy problems

  • added clean() to MultiVector

  • added leftInv() and rightInv() to MultiVector

  • moved pseudoScalar() and invPS() to MultiVector (so we can derive new classes from MultiVector)

  • changed all of the instances of creating a new MultiVector to create an instance of self.__class__ for proper inheritance

  • fixed bug in laInv()

  • fixed the massive confusion about how dot() works

  • added left-contraction

  • fixed embarrassing bug in gmt generation

  • added normal() and anticommutator() methods

  • fixed dumb bug in elements() that limited it to 4 dimensions


Konrad Hinsen fixed a few bugs in the conversion to numpy and adding some unit tests.