Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions paddle/fluid/pybind/eager_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2040,8 +2040,8 @@ paddle::experimental::Scalar CastNumpy2Scalar(PyObject* obj,
} else {
PADDLE_THROW(common::errors::InvalidArgument(
"%s(): argument (position %d) must be "
"numpy.float32/float64, numpy.int32/int64, numpy.complex64/complex128, "
"but got %s",
"numpy.float16/float32/float64, numpy.int32/int64, "
"numpy.complex64/complex128, but got %s",
op_type,
arg_pos + 1,
type_name)); // NOLINT
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/_typing/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from paddle.regularizer import WeightDecayRegularizer


Numeric: TypeAlias = Union[int, float, complex, np.number, "Tensor"]
Numeric: TypeAlias = Union[int, float, bool, complex, np.number, "Tensor"]
TensorLike: TypeAlias = Union[npt.NDArray[Any], "Tensor", Numeric]
_TensorIndexItem: TypeAlias = Union[
None, bool, int, slice, "Tensor", EllipsisType
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/tensor/manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def transpose(
return out


def unstack(x: Tensor, axis: int = 0, num: int | None = None) -> Tensor:
def unstack(x: Tensor, axis: int = 0, num: int | None = None) -> list[Tensor]:
"""
This layer unstacks input Tensor :code:`x` into several Tensors along :code:`axis`.

Expand Down