Skip to content

1.0.0

Compare
Choose a tag to compare
@Kenny2github Kenny2github released this 04 Jul 08:21
· 24 commits to main since this release

New Stuff

  • MultiVector.grade returns the grade of a blade (a single-term multivector) or None if the multivector has more than one term.
  • FEATURE: Scalar factories, by means of multivectors.set_scalar_factory(). See the end of the docs.
  • MultiVectors can now compare equal to scalars if they themselves are scalar.
  • MultiVectors can now be relationally compared with scalars if they themselves are scalar.
  • MultiVectors can now be 1/ed, but only if they are blades.
  • MultiVector.__invert__ implements the conjugate.

Changes

  • BREAKING: Removed Blade class. It is replaced by single-term MultiVectors.
  • BREAKING: Swapped behaviors of v % grade and v[idxs] - they are now v % idxs and v[grade(s)] because [] notation denotes subscript more often.
  • MultiVector.terms now returns a tuple of single-term MultiVectors.
  • MultiVector.__init__ now takes a more active role in casting values to the scalar factory.
  • An empty MultiVector is no longer possible; if there are no terms, a scalar 0 is inserted.
  • MultiVector.from_terms now always returns a MultiVector, which means that all operations now do too.
  • repr(n * _) = '(' + repr(n) + ')' to distinguish it from n.
  • Since Blade is no more, repr(v) now *-multiples bases instead of swizzling them.
  • MultiVector.__pow__ no longer supports ternary pow() because modulo means index swizzling now.
  • Normalization is now done by MultiVector.__pos__ instead of __invert__.
  • math.fsum() is no longer used as it causes Decimals to lose precision by casting them to floats. If you need precision in addition, use Decimal.
  • MultiVector.rotate will now raise a TypeError if plane is not a basis.