Skip to content

\ on Symmetric{Float32, SparseMatrixCSC{Float32, Int64} fails #125

@mohamed82008

Description

@mohamed82008
julia> using SparseArrays, LinearAlgebra

julia> a = sprand(Float64, 10, 10, 0.2);

julia> a = a'*a + I;

julia> Symmetric(a) \ rand(10);

julia> a = sprand(Float32, 10, 10, 0.2);

julia> a = a'*a + I;

julia> Symmetric(a) \ rand(Float32, 10);
ERROR: MethodError: no method matching lufact!(::SparseMatrixCSC{Float32,Int64}, ::Val{true})
Closest candidates are:
  lufact!(::Union{DenseArray{T<:Union{Complex{Float32}, Complex{Float64}, Float32, Float64},2}, Base.ReinterpretArray{T<:Union{Complex{Float32}, Complex{Float64}, Float32, Float64},2,S,A} where S, Base.ReshapedArray{T<:Union{Complex{Float32}, Complex{Float64}, Float32, Float64},2,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T, DenseArray}, SubArray{T<:Union{Complex{Float32}, Complex{Float64}, Float32, Float64},2,A,I,L} where L} where I<:Tuple{Vararg{Union{Int64, AbstractRange{Int64}, Base.AbstractCartesianIndex},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T, DenseArray} where N where T, DenseArray}, ::Union{Val{true}, Val{false}}) where T<:Union{Complex{Float32}, Complex{Float64}, Float32, Float64} at linalg\lu.jl:16
  lufact!(::Union{Hermitian{T,S}, Symmetric{T,S}} where S where T, ::Union{Val{true}, Val{false}}) at linalg\lu.jl:23
  lufact!(::Union{DenseArray{T,2}, Base.ReinterpretArray{T,2,S,A} where S, Base.ReshapedArray{T,2,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T, DenseArray}, SubArray{T,2,A,I,L} where L} where I<:Tuple{Vararg{Union{Int64, AbstractRange{Int64}, Base.AbstractCartesianIndex},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T, DenseArray} where N where T, DenseArray} where T, ::Union{Val{true}, Val{false}}) at linalg\lu.jl:64
  ...
Stacktrace:
 [1] lufact!(::Symmetric{Float32,SparseMatrixCSC{Float32,Int64}}, ::Val{true}) at .\linalg\lu.jl:24
 [2] lufact at .\linalg\lu.jl:115 [inlined] (repeats 2 times)
 [3] \(::Symmetric{Float32,SparseMatrixCSC{Float32,Int64}}, ::Array{Float32,1}) at .\linalg\generic.jl:882
 [4] top-level scope

julia> versioninfo()
Julia Version 0.7.0-DEV.3234
Commit 2cc82d29e1* (2018-01-02 11:44 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, skylake)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions