You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
multivectors.xy and from multivectors import xyz are now a thing (swizzling on the module level) but unlike class-level swizzling, invalid chars will cause an AttributeError (from multivectors import a would set a to 1.0 otherwise)
Blade.terms returns (blade,) for compatibility with MultiVector.terms
real @ blade is now supported
A ** -n = 1 / (A ** n)
real ^ blade is now supported
To better mimic regular floats, scalar blades can now be passed to complex(), int(), and arr[]
round(blade), math.trunc(blade), math.floor(blade), and math.ceil(blade) act on the scalar part, returning that times the bases
simple @ multivector is now supported
simple ^ multivector is now supported
round(multivector), math.trunc(multivector), math.floor(multivector), and math.ceil(multivector) act on each component of the multivector, returning their sum
Changes
names_to_idxs() takes a new parameter that controls whether to fail on invalid chars
repr(Blade) uses repr() on its scalar again; %.2f is still used in str()
multivector ** -n is now explicitly rejected
Fixes
names_to_idxs() no longer fails on invalid chars between e and the digits of the number (enables e_1)
idxs_to_idxs() now always returns a list
str(Blade) used to return e0 for e1
blade @ non-simple now correctly fails
Fixed infinite recursion when Blade(scalar=x) / blade
blade ^ non-simple now correctly fails
blade ^ real no longer fails
Correction: abs(blade) is (blade * blade) ** .5, not blade.scalar
float(blade) can't return NotImplemented, so raise TypeError
multivector % grade now returns the blades, not just their scalars
MultiVector.angle_to() returns a real, not a MultiVector.
Noted in docstring of MultiVector.angle_to() that multivectors of singular grade 1 only are accepted