Ask Your Question

quaternions not hashable?

asked 2016-06-14 11:19:51 -0500

dgulotta gravatar image

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-06-14 14:40:04 -0500

It is certainly due to ticket #19016. I opened ticket #20829 to fix it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-06-14 11:18:12 -0500

Seen: 34 times

Last updated: Jun 14 '16