Releases
v1.0.0
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.
MultiVector
s can now compare equal to scalars if they themselves are scalar.
MultiVector
s can now be relationally compared with scalars if they themselves are scalar.
MultiVector
s 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 MultiVector
s.
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 MultiVector
s.
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 Decimal
s 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.
You can’t perform that action at this time.