Skip to content

Commit

Permalink
FIX: sympify all instance attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Dec 18, 2023
1 parent 734da2a commit 41535ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ampform/sympy/_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def new_method(cls, *args, evaluate: bool = False, **kwargs) -> type[ExprClass]:
attr_values, kwargs = _get_attribute_values(attr_names, *args, **kwargs)
attr_values = sp.sympify(attr_values)
expr = sp.Expr.__new__(cls, *attr_values, **kwargs)
for name, value in zip(attr_names, args):
for name, value in zip(attr_names, attr_values):
setattr(expr, name, value)
if evaluate:
return expr.evaluate()
Expand Down

0 comments on commit 41535ce

Please sign in to comment.