Skip to content

Commit

Permalink
update linter
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceyan committed Nov 26, 2024
1 parent e6ad18c commit 36901ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cellxgene_schema_cli/cellxgene_schema/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,11 @@ def is_valid_row(row):
return False

# The sum of genetic ancestry values should be approximately 1.0
if ancestry_values.apply(lambda x: isinstance(x, (float, int))).all():
if abs(ancestry_values.sum() - 1.0) <= 1e-6:
return True
if (
ancestry_values.apply(lambda x: isinstance(x, (float, int))).all()
and abs(ancestry_values.sum() - 1.0) <= 1e-6
):
return True

return False

Expand Down

0 comments on commit 36901ab

Please sign in to comment.