]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/octonions.py
octonions: alias abs() to norm().
[sage.d.git] / mjo / octonions.py
index 073765ccf1ef934ab6d9f6fc59435384bf832f36..bd014c22eb4c180117cf70291e4f2357c091bd20 100644 (file)
@@ -141,6 +141,11 @@ class Octonion(IndexedFreeModuleElement):
         """
         return self._norm_squared().sqrt()
 
+    # The absolute value notation is typically used for complex numbers...
+    # and norm() isn't supported in AA, so this lets us use abs() in all
+    # of the division algebras we need.
+    abs = norm
+
     def inverse(self):
         r"""
         Return the inverse of this element if it exists.