Skip to content
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

Generate non-tuples from npst.basic_indices() #2486

Closed
Zac-HD opened this issue Jul 11, 2020 · 0 comments · Fixed by #2491
Closed

Generate non-tuples from npst.basic_indices() #2486

Zac-HD opened this issue Jul 11, 2020 · 0 comments · Fixed by #2491
Labels
enhancement it's not broken, but we want it to be better

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Jul 11, 2020

The hypothesis.extra.numpy.basic_indices() strategy is good, but per Quansight-Labs/ndindex#46 we would like to sometimes return non-tuple values. In BasicIndexStrategy.do_draw, if after all the other logic we would return a tuple of length one, if len(result) == 1 and draw(booleans()): return result[0].

@Zac-HD Zac-HD added the enhancement it's not broken, but we want it to be better label Jul 11, 2020
kir0ul added a commit to kir0ul/hypothesis that referenced this issue Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant