Skip to content

Commit fe0fac5

Browse files
committed
issue 6
1 parent 47e3d62 commit fe0fac5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SparseArrayKit"
22
uuid = "a9a3c162-d163-4c15-8926-b8794fbefed2"
33
authors = ["Jutho Haegeman <[email protected]> and Maarten Van Damme <[email protected]>"]
4-
version = "0.2.1"
4+
version = "0.2.2"
55

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/sparsearray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Base.@propagate_inbounds Base.getindex(a::SparseArray{T,N}, I::Vararg{Int,N}) wh
3131

3232
@inline function Base.setindex!(a::SparseArray{T,N}, v, I::CartesianIndex{N}) where {T,N}
3333
@boundscheck checkbounds(a, I)
34-
if v != zero(v)
34+
if !iszero(v)
3535
a.data[I] = v
3636
else
3737
delete!(a.data, I) # does not do anything if there was no key corresponding to I

0 commit comments

Comments
 (0)