Skip to content

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

Closed

Description

@opoyc

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

Activity

  1. bashtage commented on Nov 5, 2024

    @bashtage
    Owner

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

  2. opoyc commented on Nov 5, 2024

    @opoyc
    Author

    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.

  3. bashtage commented on Nov 5, 2024

    @bashtage
    Owner

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

  4. bashtage commented on Nov 5, 2024

    @bashtage
    Owner

    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.

  5. bashtage commented on Jan 8, 2025

    @bashtage
    Owner

    Closing as answered. No changes needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions