You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Didn't get an answer on Discourse, so hope to succeed here.
Let’s consider MVE:
using LinearAlgebra
using AlgebraicNumbers
M = AlgebraicNumber.([
1 2
3 4
])
b = AlgebraicNumber.([5; 6])
println(typeof(M))
println(typeof(b))
x = M * b
println(typeof(x))
Expected a Vector{AlgebraicNumber...}, not Vector{Any}, just like in this example:
using LinearAlgebra
using AlgebraicNumbers
M = Rational.([
1 2
3 4
])
b = Rational.([5; 6])
println(typeof(M))
println(typeof(b))
x = M * b
println(typeof(x))
That’s interesting that it works just fine with functions like det and tr, but not with matrix multiplication.
So, my question is: is it normal behavior? And if so, how should I perform this operation in order to get Vector{AlgebraicNumber...}? Should I just use conversion from type Any?
The text was updated successfully, but these errors were encountered:
Hi,
many thanks for using the package and for reporting this issue!
This is not normal behaviour and was caused by a type instability in the code.
I just pushed an update that should hopefully fix this.
It should be available from the registry shortly.
Please report back if it doesn't fix your issue.
Hello! Didn't get an answer on Discourse, so hope to succeed here.
Let’s consider MVE:
Expected a
Vector{AlgebraicNumber...}
, notVector{Any}
, just like in this example:That’s interesting that it works just fine with functions like
det
andtr
, but not with matrix multiplication.So, my question is: is it normal behavior? And if so, how should I perform this operation in order to get
Vector{AlgebraicNumber...}
? Should I just use conversion from typeAny
?The text was updated successfully, but these errors were encountered: