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

De-composite helper functions #47

Merged
merged 1 commit into from
Jun 18, 2020

Conversation

Zac-HD
Copy link
Contributor

@Zac-HD Zac-HD commented Jun 18, 2020

Without inter-dependencies between strategies, we can just return a strategy from a function. This has somewhat better performance because it avoids re-constructing and re-validating strategy objects (even though they're cached).

Loosely related to #46.

Without inter-dependencies between strategies, we can just return a strategy from a function.

This has somewhat better performance because it avoids re-constructing and re-validating strategy objects (even though they're cached).
@asmeurer
Copy link
Member

Thanks for the PR. I wonder if you could also comment on whether my thinking in #37 was correct.

If you have any other suggestions on improvements on my hypothesis usage, that would also be helpful. It's mostly been working for me, but I'm sure I am doing some bad things.

@Zac-HD
Copy link
Contributor Author

Zac-HD commented Jun 18, 2020

About splitting positive and negative integers? We do the same thing internally by drawing a sign bit, so there's almost no difference from using integers(-9, 10) directly.

Nothing else jumps out - one of our API design goals is that obvious uses should work well, and you're not doing anything that exotic yet. Personally I'd try to use upstream strategies more (e.g. array_shapes), but that's more a matter of taste than function. Feel free to ping me for pr reviews going forward, if that would be helpful!

@asmeurer
Copy link
Member

Ah OK. But am I at least correct that splitting things in one_of guides hypothesis about the split?

@asmeurer asmeurer merged commit 6b90b7b into Quansight-Labs:master Jun 18, 2020
@Zac-HD Zac-HD deleted the hypothesis-strategies branch June 19, 2020 01:38
@Zac-HD
Copy link
Contributor Author

Zac-HD commented Jun 19, 2020

But am I at least correct that splitting things in one_of guides hypothesis about the split?

Yep, it'll take that structure into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants