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 longer strings for unsized dtypes #2245

Merged
merged 1 commit into from Dec 1, 2019

Conversation

@Zac-HD
Copy link
Member

Zac-HD commented Nov 30, 2019

As proposed in #2229 (comment), we now do another little dance to get around Numpy's premature (in this case) allocation for strings of length one only. Closes #2229.

@Zac-HD Zac-HD added the bug label Nov 30, 2019
@Zac-HD Zac-HD requested a review from rsokl Nov 30, 2019
hypothesis-python/src/hypothesis/extra/numpy.py Outdated Show resolved Hide resolved
@Zac-HD Zac-HD force-pushed the Zac-HD:numpy-strings branch from 77e39d7 to 22ef32e Dec 1, 2019
@Zac-HD Zac-HD closed this Dec 1, 2019
@Zac-HD Zac-HD reopened this Dec 1, 2019
@rsokl
rsokl approved these changes Dec 1, 2019
@Zac-HD Zac-HD merged commit 96289c7 into HypothesisWorks:master Dec 1, 2019
2 checks passed
2 checks passed
HypothesisWorks.hypothesis #20191201.9 succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
result = np.zeros(
shape=self.array_size, dtype=object if unsized_string_dtype else self.dtype
)
print(self.dtype, result.dtype)

This comment has been minimized.

Copy link
@Stranger6667

Stranger6667 Dec 1, 2019

Contributor

hm, seems like a debugging leftover :)

This comment has been minimized.

Copy link
@Zac-HD

Zac-HD Dec 1, 2019

Author Member

Oh, darn... thanks for spotting this, I'll open a fixup pr 😅

@Zac-HD Zac-HD mentioned this pull request Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.