-
Notifications
You must be signed in to change notification settings - Fork 45
Make two_mutual_arrays accept a dtypes strategy as input #33
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
Actually it looks like torch fails because it doesn't accept an integer argument to full, only a tuple. If you patch this in hypothesis to pass in a tuple, it fails for other reasons (torch.equal doesn't return an array). I think there is a torch branch somewhere that has better array API support that we should be testing against. |
So yeah, |
Let's leave this open for making two_mutual_arrays accept a strategy as input. It's something that confuses me almost every time I run into it, so it would be good to change it if at all possible. |
Hmm, so I can't figure out how to do this nicely. Both the dtype strategies in I wrote #36 at least to raise a consistent error. |
I still don't think this is feasible/worth doing, and hopefully my custom error and more experience mitigates the problem you were having. |
two_mutual_arrays accepts a list of dtype objects rather than a strategy for generating dtypes. This is somewhat annoying, as everything else uses the dtypes strategies.
A issue with this is that it currently ignores the filtering that is done in the dtype strategies. This makes any test using it fail in pytorch, which doesn't have uint8.
If we can make it accept a dtypes strategy, that would be great. We may just need to have an internal mapping of dtype strategies to promotable dtype strategies. Or maybe we can just draw a dtype then draw another dtype that is promotable compatible with it.
The text was updated successfully, but these errors were encountered: