Open InvincibleRMC opened 3 days ago
I don't know enough about typing to meaningfully weigh the pros and cons of changing from ndarray
to NDArray
. @henryiii could you help with that?
Regarding the tuple[()]
change, we have this already:
Is your change needed anyway? Could you send a separate, small PR for that, including a test that fails without your change?
Description
Switches to using
numpy.typing.NDArray
for typing annotations overnumpy.ndarray
. This is becausenumpy.ndarray
is implemented with the first argument for some future size annotation. See https://github.com/numpy/numpy/issues/16544. Since the first argument is for the size annotation the typing of thenumpy.ndarray
is basically not being used. I also modified the eigen matrix/tensor tonumpy.typing.NDArray
as well even though stubgen fails to generate stubs sincenumpy.typing.NDArray[numpy.float64[...]]
is not a valid type.Suggested changelog entry: