PyBaMM icon indicating copy to clipboard operation
PyBaMM copied to clipboard

changed np.nparray to np.typing.NDArray

Open sanjayh-2022 opened this issue 1 year ago • 2 comments

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)
  • [x] 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:

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

sanjayh-2022 avatar Oct 18 '24 14:10 sanjayh-2022

I have made the required changes. please review my changes and let me know if any changes are required

sanjayh-2022 avatar Oct 19 '24 07:10 sanjayh-2022

You can fix the pre-commit CI and the style failures by installing pre-commit locally, please read through our Contributing guide: https://docs.pybamm.org/en/latest/source/user_guide/contributing.html#installing-and-using-pre-commit. You may also use nox -s pre-commit to do the same thing.

In particular, the following lines:

pip install pre-commit
pre-commit install

will run the style checks before any code is committed, and will hence prevent you from pushing code that fails these style checks.

agriyakhetarpal avatar Oct 21 '24 13:10 agriyakhetarpal

i have added import numpy.typing as npt after import numpy as np. Please review the changes

sanjayh-2022 avatar Oct 28 '24 05:10 sanjayh-2022

@sanjayh-2022 Are you still working on this?

kratman avatar Jan 07 '25 20:01 kratman

Marking as a draft for now, thanks for your work here so far!

agriyakhetarpal avatar Jan 08 '25 19:01 agriyakhetarpal

There has been no activity since the end of October, closing this for now

kratman avatar Jan 30 '25 15:01 kratman