We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 113defe commit f7e7d0dCopy full SHA for f7e7d0d
1 file changed
malariagen_data/util.py
@@ -1538,11 +1538,11 @@ def _compare_series_like(actual, expect):
1538
1539
# Handle object arrays, these don't get nans compared properly.
1540
t = actual.dtype
1541
- if t is object: # Type comparisons should use is, is not or isinstance() (Pylint).
+
1542
+ if t.kind == "O":
1543
expect = expect.fillna("NA")
1544
actual = actual.fillna("NA")
-
1545
- if t.kind == "f":
+ elif t.kind == "f":
1546
assert_allclose(actual.values, expect.values)
1547
else:
1548
assert_array_equal(actual.values, expect.values)
0 commit comments