Skip to content

Commit 5d92faa

Browse files
added check fo rnon negativity of size factors
1 parent f6dbf64 commit 5d92faa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

diffxpy/testing/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def parse_size_factors(size_factors, data):
6363
if isinstance(size_factors, pd.core.series.Series):
6464
size_factors = size_factors.values
6565
assert size_factors.shape[0] == data.shape[0], "data matrix and size factors must contain same number of cells"
66+
assert np.all(size_factors > 0), "size_factors <= 0 found, please remove these cells"
6667
return size_factors
6768

6869

0 commit comments

Comments
 (0)