Hello,
I don't know if I have to fill an issue so here is a julia session:
==========================================
julia> using Nemo
Welcome to Nemo version 0.53.0
Nemo comes with absolutely no warranty whatsoever
julia> a=matrix(ZZ,[111 91 50; 31 6 97;117 63 6])
[111 91 50]
[ 31 6 97]
[117 63 6]
julia> eigenvalues(ComplexField(),a)
3-element Vector{ComplexFieldElem}:
[200.119388 +/- 2.16e-7]
[-38.559694 +/- 1.26e-7] + [23.070213 +/- 1.52e-7]*im
[-38.559694 +/- 1.26e-7] + [-23.070213 +/- 1.52e-7]*im
julia> eigenvalues_with_multiplicities(ComplexField(),a)
ERROR: remove requires an exact ring
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:44
[2] remove(z::ComplexPolyRingElem, p::ComplexPolyRingElem)
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/L8iQ0/src/Poly.jl:1667
[3] valuation(a::ComplexPolyRingElem, b::ComplexPolyRingElem)
@ AbstractAlgebra
~/.julia/packages/AbstractAlgebra/L8iQ0/src/algorithms/GenericFunctions.jl:192
[4] (::Nemo.var"#eigenvalues_with_multiplicities##2#eigenvalues_with_multiplicities##3"{…})(a::ComplexFieldElem)
@ Nemo ./none:-1
[5] iterate
@ ./generator.jl:48 [inlined]
[6] collect
@ ./array.jl:790 [inlined]
[7] eigenvalues_with_multiplicities(L::ComplexField, M::ZZMatrix)
@ Nemo ~/.julia/packages/Nemo/3UN8L/src/matrix.jl:277
[8] top-level scope
@ REPL[5]:1
Some type information was truncated. Use `show(err)` to see complete types.
julia> eigenspaces(ComplexField(),a; side=:left)
ERROR: ArgumentError: Eigen spaces can only be computed over exact fields
Stacktrace:
[1] eigenspace(M::ComplexMatrix, lambda::ComplexFieldElem; side::Symbol)
@ Nemo ~/.julia/packages/Nemo/3UN8L/src/matrix.jl:316
[2] #eigenspaces#1019
@ ~/.julia/packages/Nemo/3UN8L/src/matrix.jl:366 [inlined]
[3] top-level scope
@ REPL[6]:1
julia>
===========================================
I understand the second error of course, but not the first one. if
eigenvalues_with_multiplicities also requires an exact field like
eigenspaces, would it be better to return an Argument error? Maybe
this can be fixed, eventually implemented like eigenvalues' or the
error more informative?
Regards,
Greg
PS: BTW i wonder why not all the docstrings content of src/matrix.jl
are in
https://nemocas.github.io/Nemo.jl/stable/. Some docstrings are
missing apparently (at least about eigen* stuff).