-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add option to rewrite numpy.ndarray
as nptyping.NDArray
#113
Comments
should really use |
Iirc numpy.typing leaves the size unspecified while ndtyping lets you type hint/(check?) the desired size. |
oh, hmm. open numpy issue by the looks of things: numpy/numpy#16544 |
numpy.ndarray
-> nptyping.NDArray
numpy.ndarray
as nptyping.NDArray
The question is, who would be the consumer of the resulting stubs? For a human being, the shorter notation is preferable, so original pybind11 rendering is OK (more or less) It would be nearly impossible to make everyone happy at once. Therefore, there would be various "flavors" of stubs of the same library for different consumers until we have a universal standard. The I'm sure the runtime tools ( I included the rewrite of Another included rewrite removes all "generic" parameters (enabled by We can add more rewrites (enabled by separate mutually exclusive options) to accommodate a broader range of use cases. I like The I don't see much of a problem with having both of them. |
The problem with Annotated for me is that the Vscode python extension doesn't show the information in annotated. I expect the majority of my users to be in vscode with Microsoft's python extension enabled. |
Originated from #109 by @TheTripleV
The text was updated successfully, but these errors were encountered: