From a339e89c225bb46379332ecb8b0c50b918d34ac6 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 3 Mar 2021 08:37:21 -0500 Subject: [PATCH] octonions: alias abs() to norm(). --- mjo/octonions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mjo/octonions.py b/mjo/octonions.py index 073765c..bd014c2 100644 --- a/mjo/octonions.py +++ b/mjo/octonions.py @@ -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. -- 2.43.2