We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 841942b commit a5515a3Copy full SHA for a5515a3
Orange/tests/test_statistics.py
@@ -417,6 +417,15 @@ def test_all_nans(self, array):
417
418
np.testing.assert_equal(bincount(x)[0], expected)
419
420
+ @dense_sparse
421
+ def test_all_zeros_or_nans(self, array):
422
+ """Sparse arrays with only nans with no explicit zeros will have no non
423
+ zero indices. Check that this counts the zeros properly."""
424
+ x = array([np.nan] * 5 + [0] * 5)
425
+ expected = [5]
426
+
427
+ np.testing.assert_equal(bincount(x)[0], expected)
428
429
430
class TestUnique(unittest.TestCase):
431
@dense_sparse
0 commit comments