-
Couldn't load subscription status.
- Fork 46
Description
See issue: data-apis/array-api-compat#354
This section of the test:
kw = data.draw(
hh.kwargs(
axis=st.integers(-x.ndim, x.ndim - 1),
descending=st.booleans(),
stable=st.booleans(),
),
label="kw",
)Probably enforces there are always kwargs, so we don't test default values to behave as expected...
Edit: this isn't true, missing kwargs are tested by hypothesis.
The problem comes from the fact that tested arrays are too small.
It's a common optimization in sorting algorithms to switch to insertion sort for small arrays, and insertion sort is inherently stable. See #define SMALL_QUICKSORT 15 constant in numpy's code for instance.
More generally, it's common to switch strategy for small arrays in sorting algorithm, so it's good to test long enough arrays when testing sort/argsort.