Skip to content

Commit e3e69c2

Browse files
committed
Type check is_isomorphic
Added a type check to .is_isomorphic to ensure that A is a quaternion algebra of the form (a,b)_K.
1 parent d3173af commit e3e69c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sage/algebras/quatalg/quaternion_algebra.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,9 @@ def is_isomorphic(self, A) -> bool:
10911091
sage: A == B
10921092
False
10931093
"""
1094+
if not isinstance(A, QuaternionAlgebra_ab):
1095+
raise TypeError("A must be a quaternion algebra of the form (a,b)_K")
1096+
10941097
if self.base_ring() != QQ or A.base_ring() != QQ:
10951098
raise NotImplementedError("isomorphism check only implemented for rational quaternion algebras")
10961099

0 commit comments

Comments
 (0)