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

Fill in missing types for numpy.typing.NDArray #306

Closed
paddyroddy opened this issue Oct 3, 2024 · 1 comment
Closed

Fill in missing types for numpy.typing.NDArray #306

paddyroddy opened this issue Oct 3, 2024 · 1 comment
Labels
enhancement New feature or request maintenance Maintenance: refactoring, typos, etc.

Comments

@paddyroddy
Copy link
Member

Is Your Feature Request Related to a Problem? Please Describe

Following on #305, we now have the ability to add to the type of the numpy arrays. For simplicity, these have not been filled in yet. As part of #280, it would be good to have some types added to the various arrays.

Describe the Solution You'd Like

No response

Describe Alternatives You've Considered

No response

Additional Context

No response

@paddyroddy paddyroddy added enhancement New feature or request maintenance Maintenance: refactoring, typos, etc. labels Oct 3, 2024
paddyroddy added a commit that referenced this issue Oct 3, 2024
Closes #246. Use `numpy.typing.NDArray` as the first step towards #280.
With `NDArray` we can use types, i.e. `NDArray[np.float64]`, which I'll
save for future work (#306).

I have also gone throughout and made sure anything like `ArrayLike` is
using the alias `import numpy.typing as npt`. Imports are generally in a
`if TYPE_CHECKING` block where possible.

We are using `numpy.testing` in some places. This was being aliased as
`npt`. To avoid confusion, I have removed this alias and left them as an
explicit import.
@paddyroddy paddyroddy changed the title Following #305, fill in the type of numpy.typing.NDArray Fill in missing the type of numpy.typing.NDArray Oct 3, 2024
@paddyroddy paddyroddy changed the title Fill in missing the type of numpy.typing.NDArray Fill in missing types for numpy.typing.NDArray Oct 3, 2024
@paddyroddy
Copy link
Member Author

Closing in favour of #330. I'm going to replace empty npt.NDArray with npt.ArrayLike in #308 for simplicity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintenance Maintenance: refactoring, typos, etc.
Projects
None yet
Development

No branches or pull requests

1 participant