-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests against NumPy 2 #1234
Comments
Originally posted by @timothymillar in #1228 (comment) I didn't see this before, but I agree - it looks like scikit-allel won't work against NumPy 2 since its cython code is incompatible. We only use it in the tests for comparing our methods implementations:
As @timothymillar said, we could export some test data from scikit-allel for the few remaining cases where we want to check the output of sgkit. |
Another failing case I found was in the VCF writer code.
I think this was actually passing by accident before. NumPy will round towards the nearest even value, so in this case it would be 0.000, not 0.001. However, due to what I think were changes in NumPy around value-based promotion (https://numpy.org/neps/nep-0050-scalar-promotion.html) this test fails in NumPy 2, while it passed in NumPy 1. Also, in Numba it passes - when using NumPy 1 or 2, since Numba has not yet caught up on that aspect of NumPy 2 (i.e. it is still following NumPy 1 behaviour). So I think it's best to drop the test for that case, since it is arguably incorrect anyway (0.0005 should round to 0). |
I noticed that scikit-allel is now compatible with NumPy 2, which makes this a lot easier! (Thanks @alimanfoo for that!) I have updated #1237. |
Tim made some fixes in #1228, but there are still some more
The text was updated successfully, but these errors were encountered: