diff --git a/tests/test_stats.py b/tests/test_stats.py index 6d1b1cc..993020a 100644 --- a/tests/test_stats.py +++ b/tests/test_stats.py @@ -398,4 +398,10 @@ def test_stats_benchmark( arr = array_type.random((n, n), density=density, dtype=dtype) func(arr, axis=axis) # warmup: numba compile - benchmark(func, arr, axis=axis) + + is_very_fast = func is stats.is_constant and ((array_type.name == "csr_array" and axis == 1) or (array_type.name == "csc_array" and axis == 0)) + + @benchmark + def call() -> None: + for _ in range(100 if is_very_fast else 1): + func(arr, axis=axis)