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

Work around weird behavior of np.dtype #1963

Merged
merged 1 commit into from
May 7, 2019

Conversation

Zac-HD
Copy link
Member

@Zac-HD Zac-HD commented May 7, 2019

Fixes #1798. Paraphrasing my comment there: it's triggered by a weird behaviour of np.dtype that can be rarely found by npst.array_dtypes(), where:

np.dtype([("f1", int), ("", int)]) fails, as does anything where the name "f{index}" exists elsewhere but the name at the index is "" (e.g. dtype([('', int), ('f0', int)])) - the empty name defaults to the f{index} name even if it exists elsewhere, but obviously the unique_by doesn't catch that. We can ensuring that all field names are non-empty is a decent workaround until I can talk it over with upstream.

@Zac-HD Zac-HD added the flaky-tests for when our tests only sometimes pass label May 7, 2019
Copy link
Contributor

@rsokl rsokl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Zac-HD Zac-HD merged commit 7eec4da into HypothesisWorks:master May 7, 2019
@Zac-HD Zac-HD deleted the fix-dtype-flakiness branch May 7, 2019 16:57
@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
Labels
flaky-tests for when our tests only sometimes pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_can_turn_off_subarrays is flaky
2 participants