Ask Your Question
1

quaternions not hashable?

asked 2016-06-14 18:19:51 +0100

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
1

answered 2016-06-14 21:40:04 +0100

vdelecroix gravatar image

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

Stats

Asked: 2016-06-14 18:18:12 +0100

Seen: 295 times

Last updated: Jun 14 '16