Skip to content

Commit a971b2a

Browse files
committed
add tf.slice
1 parent 41067f0 commit a971b2a

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

stubs/tensorflow/tensorflow/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ def squeeze(
402402
@overload
403403
def squeeze(input: RaggedTensor, axis: int | tuple[int, ...] | list[int], name: str | None = None) -> RaggedTensor: ...
404404

405+
def slice(input_: TensorCompatible, begin: IntTensorCompatible, size: IntTensorCompatible, name: str | None = None) -> Tensor: ...
405406
def split(
406407
value: TensorCompatible,
407408
num_or_size_splits: int | TensorCompatible,

stubs/tensorflow/tensorflow/_aliases.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +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
4243
FloatTensorCompatible: TypeAlias = tf.Tensor | int | IntArray | float | FloatArray | np.number[Any]
4344
StringTensorCompatible: TypeAlias = tf.Tensor | str | npt.NDArray[np.str_] | Sequence[StringTensorCompatible]
4445

0 commit comments

Comments
 (0)