diff --git a/Project.toml b/Project.toml index 2793319..19b7428 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SparseArrayKit" uuid = "a9a3c162-d163-4c15-8926-b8794fbefed2" authors = ["Lukas Devos ", "Maarten Van Damme ", "Jutho Haegeman "] -version = "0.4" +version = "0.4.1" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/src/base.jl b/src/base.jl index 4b6fc28..4d4c74b 100644 --- a/src/base.jl +++ b/src/base.jl @@ -10,10 +10,10 @@ function Base.:/(x::SparseArray, a::Number) return mul!(similar(x, Base.promote_eltypeof(a, x)), x, inv(a)) end function Base.:+(x::SparseArray, y::SparseArray) - return (T = Base.promote_eltypeof(x, y); axpy!(+one(T), y, copy!(similar(x, T), x))) + return (T=Base.promote_eltypeof(x, y); axpy!(+one(T), y, copy!(similar(x, T), x))) end function Base.:-(x::SparseArray, y::SparseArray) - return (T = Base.promote_eltypeof(x, y); axpy!(-one(T), y, copy!(similar(x, T), x))) + return (T=Base.promote_eltypeof(x, y); axpy!(-one(T), y, copy!(similar(x, T), x))) end Base.:-(x::SparseArray) = LinearAlgebra.lmul!(-one(eltype(x)), copy(x))