Skip to content

Commit d4fe3db

Browse files
eric-wieserutensil
authored andcommitted
Forbid passing coefficients to odd Mvs (#180)
Closes gh-81. This makes this consistent with the `even` and `mv` constructors.
1 parent 82c3719 commit d4fe3db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

galgebra/mv.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,12 @@ def _make_spinor(ga, __name, **kwargs):
248248
))
249249

250250
@staticmethod
251-
def _make_odd(ga, __name_or_coeffs, **kwargs):
251+
def _make_odd(ga, __name, **kwargs):
252252
""" Make a general odd multivector """
253+
if not isinstance(__name, str):
254+
raise TypeError("Must be a string")
253255
return reduce(operator.add, (
254-
Mv._make_grade(ga, __name_or_coeffs, grade, **kwargs)
256+
Mv._make_grade(ga, __name, grade, **kwargs)
255257
for grade in range(1, ga.n + 1, 2)
256258
), S(0)) # base case needed in case n == 0
257259

0 commit comments

Comments
 (0)