8000 MAINT: Move aliases for common scalar unions to `numpy.typing` by BvB93 · Pull Request #17429 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Move aliases for common scalar unions to numpy.typing #17429

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 4 commits into from
Oct 7, 2020

Conversation

BvB93
Copy link
Member
@BvB93 BvB93 commented Oct 3, 2020

Continuation of #17096: This PR adds aliases for common scalar union.

More specifically, it moves them from numpy to numpy.typing, as they had been
naturally popping up in the former as time progressed.

Examples

>>> from typing import Union
>>> import numpy as np

>>> _IntLike = Union[int, np.integer]
>>> _FloatLike = Union[_IntLike, float, np.floating]
...

@charris
Copy link
Member
charris commented Oct 5, 2020

Close/reopen.

@charris charris closed this Oct 5, 2020
@charris charris reopened this Oct 5, 2020
@BvB93
Copy link
Member Author
BvB93 commented Oct 5, 2020

The previous PyPy failure seems the be related to #17420.
Do you know by any chance if there is already a solution to aforementioned issue?

@charris
Copy link
Member
charris commented Oct 5, 2020

The Windows PyPy test is currently disabled in master, that's why the close/reopen.

Bas van Beek added 4 commits < 8000 a href="#commits-pushed-5c82cb1" data-view-component="true" class="Link--inTextBlock Link--secondary Link">October 5, 2020 17:24
@BvB93
Copy link
Member Author
BvB93 commented Oct 5, 2020

Github had a rather inventive way of "resolving" a merge conflict caused by #17372.
Fixed as of a86bc46.

@mattip
Copy link
Member
mattip commented Oct 7, 2020

@BvB93 is this good to go even without gh-17096? I ask since the initial comment mentions this is a continuation.

@BvB93
Copy link
Member Author
BvB93 commented Oct 7, 2020

@BvB93 is this good to go even without gh-17096? I ask since the initial comment mentions this is a continuation.

Yes, as the __init__.pyi file has changed quite a bit since gh-17096 it was easier (and cleaner) to start over again,
hence this new PR. The old PR can be ignored.

@mattip mattip merged commit fd01786 into numpy:master Oct 7, 2020
@mattip
Copy link
Member
mattip commented Oct 7, 2020

Thanks @BvB93

@BvB93 BvB93 deleted the scalar-union2 branch October 7, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0