-
Notifications
You must be signed in to change notification settings - Fork 52
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
nptyping latest version still includes deprecated numpy value #153
Comments
Seems like there are lots of deprecated types remaining in nptyping and my issue is probably a duplicate of @eleftherioszisis issue. Leaving open because this issue breaks install/import of pynrrd latest and want to bring attention to the issue. |
Fixes #152, #153 I replaced `nptyping` NDArray occurrences with `numpy.typing` ones. I am not sure if it's possible to specify shape restrictions without forcing the package to require `python>=3.9` so that [type subscription](https://peps.python.org/pep-0585/) is available and things like `np.ndarray[Literal[1], np.dtype[Any]]` can be declared. Note that `numpy.typing.NDArray` is a type alias for `np.ndarray[Any, np.dtype[+ScalarType]]` where `ScalarType` contains the following types: ``` (int, float, complex, bool, bytes, str, memoryview, numpy.bool_, numpy.complex64, numpy.complex128, numpy.complex256, numpy.float16, numpy.float32, numpy.float64, numpy.float128, numpy.int8, numpy.int16, numpy.int32, numpy.int64, numpy.longlong, numpy.timedelta64, numpy.datetime64, numpy.object_, numpy.bytes_, numpy.str_, numpy.uint8, numpy.uint16, numpy.uint32, numpy.uint64, numpy.ulonglong, numpy.void) ``` Although it is simpler to use it as it is, please let me know if a more permissible `NDArray[Any]` is preferred.
Fixed in #154. New major release pending |
@addisonElliott > New major release pending Any update on this? Do you have a timeline on when the new release would happen? |
Sorry, I've been meaning to find the time to do that. Hopefully this weekend or next week. I have another feature I want to merge in and do a minor release. I was going to do a major release, but I think it's a minor enough change that a minor will suffice. |
No problem and thanks for the update. |
np.bool8 was deprecated in numpy version 1.24.0
numpy/numpy#23755
nptyping still includes this value:
ramonhagenaars/nptyping#124
Due to pynrrd dependency on nptyping, import of pynrrd latest fails.
Keep an eye on nptyping for a fix or remove dependency as @eleftherioszisis suggests.
The text was updated successfully, but these errors were encountered: