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