We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cc3330 commit bcd0067Copy full SHA for bcd0067
python/paddle/tensor/random.py
@@ -19,7 +19,7 @@
19
from typing import TYPE_CHECKING
20
21
import paddle
22
-from paddle import _C_ops, _legacy_C_ops
+from paddle import _C_ops
23
from paddle.base.framework import _current_expected_place
24
from paddle.base.libpaddle import DataType
25
from paddle.common_ops_import import Variable
@@ -1696,17 +1696,11 @@ def randint_like(
1696
if in_dynamic_or_pir_mode():
1697
if in_dynamic_mode():
1698
shape = paddle.utils.convert_shape_to_list(shape)
1699
- out = _legacy_C_ops.randint(
1700
- 'shape',
1701
- shape,
1702
- 'low',
+ out = _C_ops.randint(
1703
low,
1704
- 'high',
1705
high,
1706
- 'seed',
1707
- 0,
1708
- 'dtype',
1709
- core.VarDesc.VarType.INT64,
+ shape,
+ DataType.INT64,
1710
)
1711
else:
1712
check_type(
0 commit comments