Skip to content

Commit

Permalink
Merge pull request #104 from VolkerBergen/patch-2
Browse files Browse the repository at this point in the history
allow negative values in sparse data
  • Loading branch information
slinnarsson authored Jun 25, 2019
2 parents 6df90db + f1430f5 commit 2e620d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion loompy/loom_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def sparse(self, rows: np.ndarray = None, cols: np.ndarray = None) -> scipy.spar
vals = view.layers[self.name][rows, :]
else:
vals = view.layers[self.name][:, :]
nonzeros = np.where(vals > 0)
nonzeros = np.where(vals != 0)
data.append(vals[nonzeros])
row.append(nonzeros[0])
col.append(nonzeros[1] + i)
Expand Down

0 comments on commit 2e620d2

Please sign in to comment.