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

Updated np.ndarray to numpy.typing.NDArray everywhere by writing a script to do the changes automatically #4518

Closed
wants to merge 14 commits into from

Conversation

sanjayh-2022
Copy link

@sanjayh-2022 sanjayh-2022 commented Oct 16, 2024

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #4512

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

sanjayh-2022 and others added 12 commits October 16, 2024 12:29
added numpy.typing.NDArray
added numpy.typing.NDArray
added numpy.typing.NDArray
added numpy.typing.NDArray
added numpy.typing.NDArray
Added numpy.typing.NDArray
Added numpy.typing.NDArray
Added numpy.typing.NDArray
Added numpy.typing.NDArray
Added numpy.typing.NDArray
Copy link
Member

@arjxn-py arjxn-py left a comment

Choose a reason for hiding this comment

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

Hi @sanjayh-2022, thanks for starting this.

Just a heads up, You didn't actually needed to write a script to do these changes automatically as you can always use VS code search & replace using Ctrl+Shift+F.

Another thing that you might want to replace numpy.typing.NDArray with np.typing.NDArray everywhere, since we import numpy as np

@sanjayh-2022 sanjayh-2022 closed this by deleting the head repository Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use numpy.typing.NDArray instead of np.ndarray
3 participants