-
Notifications
You must be signed in to change notification settings - Fork 768
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
The help of numpy.random.choice is not complete #2243
Comments
I presume that you're looking for a docstring or other documentation? The type information and docstrings come from numpy itself. If you right-click on |
Thank you, I have reported to numpy. |
Putting type information only in pyi files is standard. docstrings are not incorporated in these files generally. Other IDEs, e.g., PyCharm, can seamlessly incorporate pyi information with standard docstrings. I don't expect NumPy, or many other projects that have compiled code and use pti for typing, will move their docstrings away from the code into type stub files. Related to numpy/numpy#20809 |
numpy/numpy#20809 (comment) |
Following up on this comment: the issue seems to be limited to functions that are purely C- or Cython-based, lacking any wrapper of some sort written in pure-python. |
@BvB93 Do the examples of functions with python wrappers have docstrings and typing information together. or is the docstring in the .py file and the typing in a .pyi? |
The docstrings and annotations are always split between .py/.pyx and .pyi files. Shows docstrings
Does not show docstrings
|
I see. while it's type information is here |
Pylance will find and display docstrings for functions and classed declared in ".pyi" files if it can find the same symbol in a corresponding ".py" file. In the case of |
This issue has been fixed in version 2022.1.3, which we've just released. You can find the changelog here: CHANGELOG.md |
I found the help information of numpy.random.choice is not complete. It only have the function declaration.
The text was updated successfully, but these errors were encountered: