Skip to content

Bound test_full fill values to default dtypes - #31

Merged
asmeurer merged 1 commit into
data-apis:masterfrom
honno:safe-test-full
Oct 21, 2021
Merged

asmeurer merged 1 commit into
data-apis:masterfrom
honno:safe-test-full

Conversation

@honno

@honno honno commented Oct 21, 2021

Copy link
Copy Markdown
Member

Currently our test suite can fail for test_full (depending on the Hypothesis seed or max examples) because I didn't bound fill_value generation to the bounds of the default dtypes. This PR fixes that by inferring the default int and float in dtype_helpers, and using that to prevent passing dtypes with values that cannot be represented by the default dtypes.

This should be useful for the future too.

@asmeurer

Copy link
Copy Markdown
Member

Looks good. It would be nice if we had a library that defaulted to float32 to test this against. Does NumPy default to 32-bit types when compiled 32-bit?

@asmeurer
asmeurer merged commit 07b4081 into data-apis:master Oct 21, 2021
@honno
honno deleted the safe-test-full branch February 8, 2022 10:05
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.

2 participants