Skip to content

Better undefined dtype behaviour #55

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

Merged
merged 1 commit into from
Jan 4, 2022
Merged

Conversation

honno
Copy link
Member

@honno honno commented Jan 4, 2022

This PR fixes some issues with undefined dtypes not being filtered from custom Hypothesis strategies, and additionally skips test cases which are explicitly passed undefined dtypes (i.e. for type promotion). cc @pmeier

@honno honno merged commit e4ce31e into data-apis:master Jan 4, 2022
@pmeier
Copy link
Contributor

pmeier commented Jan 4, 2022

This does not fix the issue that I faced in

def _dtypes_sorter(dtype_pair: Tuple[DataType, DataType]):

The problem arises if we hit

rank1 = _sorted_dtypes.index(dtype1)
rank2 = _sorted_dtypes.index(dtype2)

with an undefined dtype, since _sorted_dtypes only contains valid dtypes.

@honno
Copy link
Member Author

honno commented Jan 4, 2022

@pmeier Ah I opted to filter dtypes in a different step (the definition of promotable_dtypes), so I believe it should all work out.

@honno honno deleted the partial-dtypes2 branch February 28, 2024 13:20
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