-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
It would be awesome if dropzeros! were extended so the following pattern worked:
# create a sparse array
a = rand(4, 3)
as = sparse(a)
# loop over columns
for c in eachcol(as)
# do something that creates some nonstructural zeros
c[rand(1:4)] = 0
# drop zeros per column subarray
# dropzeros!(c) # fails due to missing method
endObviously in this example I could call dropzeros! on the entire matrix at the end, but in other cases it may be more natural to nest it in a per-loop function.
Metadata
Metadata
Assignees
Labels
No labels