Conversation
tests/test_funcs.py
Outdated
| x[mask] = -np.inf | ||
| mask = rng.random(shape) > 0.9 | ||
| x[mask] = np.inf | ||
| x = np.sort(x, stable=True, axis=-1) |
There was a problem hiding this comment.
This is unnecessary and causing CI failures.
| x = np.sort(x, stable=True, axis=-1) | |
| x = np.sort(x, axis=-1) |
|
Re: I don't really want to deal with typing or GHA lint complaints in I don't know what to do about GHA's lint complaints in |
How are you seeing these failures? Via |
|
Yup |
|
bizarre! |
|
maybe it's all because Details |
|
seems to be the problem yes, I fear it might be something windows-specific. |
|
K, well I got on my mac, fixed most of the complaints, and silenced the rest. |
Addresses scipy/scipy#23930 (comment)
Thoughts:
searchsortedfor all 1D tests. It would be good to have some way of running the 1D test cases with the genericsearchsortedcode, though. The important part is the length of the arrays along the last axis, so the simplest way would be to just define 2D cases with the same lengths along the second axis.torchdelegates multidimensional cases totorch.searchsorted, too, but it behaves differently than other backends in some cases involving NaNs. It doesn't surprise me because the standard doesn't define sorting w/ NaNs and torch doesn't always do the typical thing. Not sure how deeply we want to go into that.broadcast_shapesto help with that, but I would prefer not to work on that. I could add a check for this condition and raise a consistent error, if that would be sufficient.sideis one of the allowed values?