Skip to content

No convert(AbstractArray/Array, X) methods for BunchKaufman #376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Sacha0 opened this issue Oct 16, 2016 · 1 comment
Closed

No convert(AbstractArray/Array, X) methods for BunchKaufman #376

Sacha0 opened this issue Oct 16, 2016 · 1 comment

Comments

@Sacha0
Copy link
Member

Sacha0 commented Oct 16, 2016

BunchKaufman lacks convert(Array/Matrix, F) and convert(AbstractArray/AbstractMatrix, F) methods. (Nor has it a full method). Best!

julia> VERSION
v"0.6.0-dev.979"

julia> A = bkfact(Array(SymTridiagonal(fill(2, 4), ones(3))))
Base.LinAlg.BunchKaufman{Float64,Array{Float64,2}}([1.25 0.75 0.0 0.0; 1.0 1.33333 0.666667 0.0; 0.0 1.0 1.5 0.5; 0.0 0.0 1.0 2.0],[1,2,3,4],'U',true,false,0)

julia> Array(A)
ERROR: MethodError: Cannot `convert` an object of type Base.LinAlg.BunchKaufman{Float64,Array{Float64,2}} to an object of type Array{T,N}
This may have arisen from a call to the constructor Array{T,N}(...),
since type constructors fall back to convert methods.
 in Array{T,N}(::Base.LinAlg.BunchKaufman{Float64,Array{Float64,2}}) at ./sysimg.jl:66

julia> AbstractArray(A)
ERROR: MethodError: Cannot `convert` an object of type Base.LinAlg.BunchKaufman{Float64,Array{Float64,2}} to an object of type AbstractArray{T,N}
This may have arisen from a call to the constructor AbstractArray{T,N}(...),
since type constructors fall back to convert methods.
 in AbstractArray{T,N}(::Base.LinAlg.BunchKaufman{Float64,Array{Float64,2}}) at ./sysimg.jl:66
@andreasnoack
Copy link
Member

The factors in the Bunch-Kaufman don't separate as nicely as the factors in LU with partial pivoting and the LAPACK have a function for reconstructing the input. It would therefore be a little tedious to write a function which wouldn't be that useful.

@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants