Skip to content

Commit 9c02549

Browse files
committed
fix: IntTensorCompatible type
1 parent e1a09bf commit 9c02549

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

stubs/tensorflow/tensorflow/_aliases.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ StrDataSequence: TypeAlias = Sequence[str] | Sequence[StrDataSequence]
3939
DataSequence: TypeAlias = FloatDataSequence | StrDataSequence | IntDataSequence
4040
ScalarTensorCompatible: TypeAlias = tf.Tensor | str | float | np.ndarray[Any, Any] | np.number[Any]
4141
UIntTensorCompatible: TypeAlias = tf.Tensor | int | UIntArray
42-
IntTensorCompatible: TypeAlias = tf.Tensor | int | IntArray
42+
IntTensorCompatible: TypeAlias = tf.Tensor | int | IntArray | Sequence[IntTensorCompatible]
4343
FloatTensorCompatible: TypeAlias = tf.Tensor | int | IntArray | float | FloatArray | np.number[Any]
4444
StringTensorCompatible: TypeAlias = tf.Tensor | str | npt.NDArray[np.str_] | Sequence[StringTensorCompatible]
4545

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
from collections.abc import Sequence
1+
from tensorflow._aliases import IntTensorCompatible, TensorCompatible
22

3-
from tensorflow import Tensor
4-
from tensorflow._aliases import IntArray, TensorCompatible
5-
6-
def random_crop(
7-
value: TensorCompatible, size: Sequence[int] | IntArray | Tensor, seed: int | None = None, name: str | None = None
8-
): ...
3+
def random_crop(value: TensorCompatible, size: IntTensorCompatible, seed: int | None = None, name: str | None = None): ...
94
def __getattr__(name: str): ... # incomplete module

0 commit comments

Comments
 (0)