Skip to content

Commit

Permalink
Add indtype and nnz definitions for SparseColumnView
Browse files Browse the repository at this point in the history
  • Loading branch information
jmert committed Dec 26, 2018
1 parent 74bf25c commit e90995c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stdlib/SparseArrays/src/sparsevector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ function nonzeroinds(x::SparseColumnView)
return y
end

indtype(x::SparseColumnView) = indtype(parent(x))
function nnz(x::SparseColumnView)
rowidx, colidx = parentindices(x)
return length(nzrange(parent(x), colidx))
end

## similar
#
Expand Down

0 comments on commit e90995c

Please sign in to comment.