Open leoschwarz opened 8 months ago
Thanks for reporting this. I can reproduce this locally.
The error is possibly due to lack of a guards around the internal implementation for np.median
within Numba.
It originates from the following line:
Where n = shape of the flattened array = 0
which makes the logic think that variable low
equals 0
and variable high
equals -1
.
A possible fix is to simply check for this edge case and return nan
if no elements exist within the array. Marking this as a good first issue.
Reporting a bug
This is a very similar issue to #8451 but here it affects
numpy.median
and setting the error_model does not change the outcome.While numpy returns
nan
, numba raises an AssertionError: