Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

replace uses of np.ndarray with npt.NDArray in type annotations#387

Open
igorsugak wants to merge 1 commit intofacebookresearch:main from
igorsugak:export-D63360858
Open

replace uses of np.ndarray with npt.NDArray in type annotations #387
igorsugak wants to merge 1 commit intofacebookresearch:main from
igorsugak:export-D63360858

Conversation

@igorsugak
Copy link

@igorsugak igorsugak commented Sep 25, 2024

Summary:
To facilitate PSS-2 upgrade, this uses ndt.NDArray instead of nd.ndarray in type annotations. It was backported to Numpy-1.19 (PSS-1) as alias to nd.ndarray -- a noop. In Numpy-1.24, ndt.NDArray a proper generic type, and without this change uses of nd.ndarray generate the following Pyre error:

 Invalid type parameters [24]: Generic type `np.ndarray` expects 2 type parameters.

Differential Revision: D63360858

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 25, 2024
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63360858

...bookresearch#387)
Summary:
Pull Request resolved: facebookresearch#387
To facilitate PSS-2 upgrade, this uses `ndt.NDArray` instead of `nd.ndarray` in type annotations. It was backported to Numpy-1.19 (PSS-1) as alias to `nd.ndarray` -- a noop. In Numpy-1.24, `ndt.NDArray` a proper generic type, and without this change uses of `nd.ndarray` generate the following Pyre error:
```counterexample
 Invalid type parameters [24]: Generic type `np.ndarray` expects 2 type parameters.
```
Reviewed By: florazzz
Differential Revision: D63360858
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63360858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /