Skip to content

Commit bcd0067

Browse files
committed
Fix
1 parent 9cc3330 commit bcd0067

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

python/paddle/tensor/random.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from typing import TYPE_CHECKING
2020

2121
import paddle
22-
from paddle import _C_ops, _legacy_C_ops
22+
from paddle import _C_ops
2323
from paddle.base.framework import _current_expected_place
2424
from paddle.base.libpaddle import DataType
2525
from paddle.common_ops_import import Variable
@@ -1696,17 +1696,11 @@ def randint_like(
16961696
if in_dynamic_or_pir_mode():
16971697
if in_dynamic_mode():
16981698
shape = paddle.utils.convert_shape_to_list(shape)
1699-
out = _legacy_C_ops.randint(
1700-
'shape',
1701-
shape,
1702-
'low',
1699+
out = _C_ops.randint(
17031700
low,
1704-
'high',
17051701
high,
1706-
'seed',
1707-
0,
1708-
'dtype',
1709-
core.VarDesc.VarType.INT64,
1702+
shape,
1703+
DataType.INT64,
17101704
)
17111705
else:
17121706
check_type(

0 commit comments

Comments
 (0)