From d853c70706757fcd03d3c11dcf4c7c02b0b39f40 Mon Sep 17 00:00:00 2001 From: utensil Date: Tue, 2 Apr 2024 09:59:20 +0800 Subject: [PATCH] Try fix `norm` by using `metric.square_root_of_expr` instead of `sqrt` --- galgebra/mv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galgebra/mv.py b/galgebra/mv.py index 0ae7e5ef..97b22b44 100644 --- a/galgebra/mv.py +++ b/galgebra/mv.py @@ -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()