Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

quaternions not hashable?

If I try to take the hash of a quaternion, I get an error:

sage: D.<i,j,k>=QuaternionAlgebra(QQ,-1,-3)
sage: hash(i)
TypeError                                 Traceback (most recent call last)
<ipython-input-2-037418ebb374> in <module>()
----> 1 hash(i)

TypeError: unhashable type: 'sage.algebras.quatalg.quaternion_algebra_element.QuaternionAlgebraElement_rational_field'

I seem to remember quaternions being hashable in a previous version of Sage (I think I was using 6.7 before). Is it intentional that quaternions are now unhashable, or is this an omission?