Skip to content

Commit

Permalink
update check raw data util
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgayoso authored and ivirshup committed Jul 29, 2020
1 parent d79213f commit fb63e4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scanpy/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,11 @@ def update_params(
# --------------------------------------------------------------------------------


def check_nonnegative_integers(X: Union[np.ndarray, sparse.csr_matrix]):
def check_nonnegative_integers(X: Union[np.ndarray, sparse.spmatrix]):
"""Checks values of X to ensure it is count data
"""

data = X if type(X) is np.ndarray else X.data
data = X if isinstance(X, np.ndarray) else X.data
# Check no negatives
if np.any(data < 0):
return False
Expand Down

0 comments on commit fb63e4c

Please sign in to comment.