Skip to content

Support for sparse matrix multiplication #108

Description

@tkoolen

I just noticed that in @expression and in @constraint sparse matrices are not accepted.
For example, A=spzeros(n,m). If I use
A_expr = @expression A or @constraint(model, A * X ==0)
It gives me this error:

ERROR: LoadError: MethodError: no method matching one(::Type{Any})
Closest candidates are:
  one(::Type{Union{Missing, T}}) where T at missing.jl:87
  one(::Missing) at missing.jl:83
  one(::BitArray{2}) at bitarray.jl:400
  ...
Stacktrace:
 [1] one(::Type{Any}) at ./missing.jl:87
 [2] *(::SparseMatrixCSC{Float32,Int64}, ::Array{Variable,1})at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/SparseArrays/src/linalg.jl:53

Originally posted by @ssadat in #107 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions