Skip to content

Implement Matrix Division #768

@Tortar

Description

@Tortar

E.g. currently

julia> using Finch

julia> A = fsprand(Float64, 2, 2, 1.);

julia> b = [1.0, 0.1];

julia> b \ A
ERROR: MethodError: no method matching adjoint(::Tensor{SparseCOOLevel{2, Tuple{…}, Vector{…}, Tuple{…}, ElementLevel{…}}})

Closest candidates are:
  adjoint(::Missing)
   @ Base missing.jl:101
  adjoint(::LinearAlgebra.AdjointFactorization)
   @ LinearAlgebra ~/.julia/juliaup/julia-1.10.10+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/factorization.jl:61
  adjoint(::LinearAlgebra.BunchKaufman)
   @ LinearAlgebra ~/.julia/juliaup/julia-1.10.10+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/bunchkaufman.jl:283
  ...

Stacktrace:
 [1] \(x::Vector{Float64}, y::Tensor{SparseCOOLevel{2, Tuple{…}, Vector{…}, Tuple{…}, ElementLevel{…}}})
   @ Base ./operators.jl:625
 [2] top-level scope
   @ REPL[4]:1
Some type information was truncated. Use `show(err)` to see complete types.

julia> using SparseArrays

julia> A = sprand(Float64, 2, 2, 1.);

julia> b = [1.0, 0.1];

julia> b \ A # this works with SparseArrays
1×2 transpose(::Vector{Float64}) with eltype Float64:
 0.316286  0.146342

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