-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Deprecation warnings in assert_array_equal #15051
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
Comments
I think the intention here is to only use
? |
Indeed, I am not sure this (or possibly even the general issue with |
The issue I see is that previously working / valid FWIW it seems like
Yes this is a possible workaround. The issue is that there could be tens or hundreds of such cases in a given code base. Then of course you could write your own a Adapting |
Related to the multiple issues about
np.array(x)
emitting a deprecation warning, it appears thatnp.testing.assert_array_equal
emits a warning when the arguments get cast to an object array. This should probably not emit such a warning:For projects that use warnings-as-errors in CIs,
assert_array_equal
on things that get cast to object arrays is now problematic. There might be other members ofnp.testing
with a similar issue.Perhaps
assert_array_equal
should make use of the warning-catching suggested in #15047, but the non-thread-safeness ofcatch_warnings
makes me a bit wary of this solution.The text was updated successfully, but these errors were encountered: