Skip to content
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

feat: add ArrayLike to xref #568

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions numpydoc/xref.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"np.ndarray": "numpy.ndarray",
"array-like": ":term:`numpy:array_like`",
"array_like": ":term:`numpy:array_like`",
"ArrayLike": ":term:`numpy.typing.ArrayLike`",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"ArrayLike": ":term:`numpy.typing.ArrayLike`",
"ArrayLike": ":term:`numpy:array_like`",

Here's the description of the term array_like vs. the description of the term typing.ArrayLike.

I still think the former is likely what you'd want to link to for users: it describes what array_like means, as opposed to how the annotation is expected to behave in a static typing context.

Not a blocker though, feel free to do as you see fit!

"scalar": ":ref:`scalar <numpy:arrays.scalars>`",
"RandomState": "numpy.random.RandomState",
"np.random.RandomState": "numpy.random.RandomState",
Expand Down