Skip to content

Commit

Permalink
Try fix norm by using metric.square_root_of_expr instead of sqrt
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Apr 2, 2024
1 parent 5c7964b commit d853c70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion galgebra/mv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ def norm(self, hint='0') -> Expr:
sign, except when the quadratic form's sign can be determined
by other considerations, such as the metric being Euclidean.
"""
return simplify(sqrt(self.norm2(hint)))
return simplify(metric.square_root_of_expr(self.norm2(hint)))
# ## GSG code ends ###

__abs__ = norm # allow `abs(x)` to call z.norm()
Expand Down

0 comments on commit d853c70

Please sign in to comment.