Skip to content

Commit 6b41918

Browse files
committed
oops
1 parent 3b2494b commit 6b41918

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

stdlib/SparseArrays/src/higherorderfns.jl

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
module HigherOrderFns
44

5-
_goodbuffers(n, colptr, rowval, nzval) = length(colptr) == n + 1 && colptr[end] - 1 == length(rowval) == length(nzval)
6-
_goodbuffers(S::SparseMatrixCSC) = _goodbuffers(S.n, S.colptr, S.rowval, S.nzval)
7-
_checkbuffers(S::SparseMatrixCSC) = (@assert _goodbuffers(S); S)
8-
_checkbuffers(S::SparseVector) = (@assert length(S.nzval) == length(S.nzind); S)
9-
105
# This module provides higher order functions specialized for sparse arrays,
116
# particularly map[!]/broadcast[!] for SparseVectors and SparseMatrixCSCs at present.
127
import Base: map, map!, broadcast, copy, copyto!
@@ -152,6 +147,9 @@ function _reset!(C::SparseMatrixCSC)
152147
empty!(C.nzval)
153148
end
154149

150+
_checkbuffers(S::SparseMatrixCSC) = (@assert length(colptr) == n + 1 && colptr[end] - 1 == length(rowval) == length(nzval); S)
151+
_checkbuffers(S::SparseVector) = (@assert length(S.nzval) == length(S.nzind); S)
152+
155153
_capacity(A::SparseVecOrMat) = capacity(storedinds(A))
156154

157155
# (2) map[!] entry points

0 commit comments

Comments
 (0)