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

TypeError: 'numpy._DTypeMeta' object is not subscriptable #756

Open
opoyc opened this issue Nov 5, 2024 · 4 comments
Open

TypeError: 'numpy._DTypeMeta' object is not subscriptable #756

opoyc opened this issue Nov 5, 2024 · 4 comments

Comments

@opoyc
Copy link

opoyc commented Nov 5, 2024

Hello!

It seems that this typing is not compatible with latest versions of numpy. in typing.py:

NDArray = Union[np.ndarray]
Float64Array = np.ndarray[Any, np.dtype[np.double]] # pragma: no cover <----------
Int64Array = np.ndarray[Any, np.dtype[np.longlong]] # pragma: no cover
Int32Array = np.ndarray[Any, np.dtype[np.intc]] # pragma: no cover

@bashtage
Copy link
Owner

bashtage commented Nov 5, 2024

Is this an error you see when typing or running code? Which version of Numpy and Python?

@opoyc
Copy link
Author

opoyc commented Nov 5, 2024

When running the code. It was working fine until yesterday. It's used in tsfeatures. This is our current env:

numpy==1.20.0
tsfeatures==0.4.5

I've raised a PR for your revision.

@bashtage
Copy link
Owner

bashtage commented Nov 5, 2024

Your numpy is too old for the latest release. The minimum is 1.22.3 now. Which arch version are you trying to use?

@bashtage
Copy link
Owner

bashtage commented Nov 5, 2024

If you are stuck with NumPy < 1.22 then you should really pin arch to be < 7. The reason for this is that NumPy 7+ is build using NumPy 2.0.0+ for the C api. This is only backward compat back to NumPy 1.22.3.

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

No branches or pull requests

2 participants