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 9ae63ae commit ecfaa8cCopy full SHA for ecfaa8c
tests/test_stats.py
@@ -96,5 +96,10 @@ def test_sum_benchmark(
96
except NotImplementedError:
97
pytest.skip("random_array not implemented for dtype")
98
99
- stats.sum(arr, axis=axis) # type: ignore[arg-type] # warmup: numba compile
100
- benchmark(stats.sum, arr, axis=axis)
+ def sum(arr, axis):
+ if hasattr(arr, sum):
101
+ return arr.sum(axis=axis)
102
+ return np.sum(arr, axis=axis)
103
+
104
+ sum(arr, axis=axis) # type: ignore[arg-type] # warmup: numba compile
105
+ benchmark(sum, arr, axis=axis)
0 commit comments