Do we really want that the parent of the result depends on the *value* of
its input here, rather than on the parent of the input?
Actually, strictly speaking the documentation promises something else:
Return a sequence of the eigenvalues of a matrix, with
multiplicity. If the eigenvalues are roots of polynomials in ``QQ``,
then ``QQbar`` elements are returned that represent each separate
root.
Do I misunderstand this, or *is* the behaviour a bug? (If so, it is easy
to fix.)
I am guessing that harmonizing the hash of QQbar with the hash of QQ is
expensive. Also, I don't think it would be the correct fix.
Martin
On Tuesday, 2 December 2025 at 23:20:30 UTC+1 Martin R wrote:
> sage: OZ = lambda P: (ones_matrix(P.cardinality()) - P.lequal_matrix())
> sage: set(min(OZ(P).eigenvalues()) for n in range(1, 7) for P in posets(n))
> {-1, -1, 0}
> sage: [type(x) for x in _]
> [<class 'sage.rings.rational.Rational'>,
> <class 'sage.rings.rational.Rational'>,
> <class 'sage.rings.qqbar.AlgebraicNumber'>]
>
>
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/sage-devel/2d72c2f9-44ba-4062-9d12-720389c1e492n%40googlegroups.com.