-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
ENH: Add annotations to 3 functions in np.core.function_base
#17144
Conversation
This is the first version that includes `SupportsIndex`
`SupportsIndex` is apparently still missing from the typing-extensions 3.7.4.2 pypi release (see python/typing#749): manually define the protocol in the relevant stubs.
Co-Authored-By: Eric Wieser <eric-wieser@users.noreply.github.com>
….7.4.3" This reverts commit c9c44fd.
A bit of context about the back-and-forth in 72e11d3, c9c44fd & 68832b3: Typing-extensions 3.7.4.3 added a backport of the (in python 3.8 introduced) I suspect that this minor inconvience will be fixed somewhere around the release of either mypy 0.783 or 0.784. |
There are a number of PRs with the |
I'm trying to when I can, and I've merged some - but I'm pretty low on bandwidth. |
@BvB93 Needs rebase. |
Thanks @BvB93 . |
This pull requests adds annotations to 3 functions in
np.core.function_base
:linspace
logspace
geomspace
As the main
__init__.pyi
file in numpy is starting to get somewhat clutteredthe respective stubs have been defined for the relevant sub-module instead.
Secondly, the docstring of
logspace
has been updated in order to clarify thatits
base
parameter can be array_like; not just a float.