From 2538d7378831c875ed7696ca6c816d7004e3982c Mon Sep 17 00:00:00 2001 From: Nour Yosri Date: Wed, 12 Feb 2025 20:20:41 -0800 Subject: [PATCH] fix type annotation of .shape --- tunits/core/__init__.pyi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tunits/core/__init__.pyi b/tunits/core/__init__.pyi index 36c04d7..1e9bb86 100644 --- a/tunits/core/__init__.pyi +++ b/tunits/core/__init__.pyi @@ -2,7 +2,6 @@ from typing import ClassVar, Sequence, Any, Callable, Iterator, overload, Generi import abc from attrs import frozen from typing_extensions import TypeVar -from numpy._typing import _ShapeLike from numpy.typing import NDArray, DTypeLike import numpy as np @@ -337,7 +336,7 @@ class ValueArray(Generic[ValueType2], WithUnit): @property def ndim(self) -> int: ... @property - def shape(self) -> _ShapeLike: ... + def shape(self) -> tuple[int, ...]: ... def __abs__(self: ArrayType) -> ArrayType: ... def __divmod__(self: ArrayType, other: Any) -> tuple[_NUMERICAL_TYPE_OR_ARRAY, ArrayType]: ... def __add__(self: ArrayType, other: Any) -> ArrayType: ...