Skip to content

Commit

Permalink
fix cast
Browse files Browse the repository at this point in the history
  • Loading branch information
gouzil committed Dec 22, 2023
1 parent a94ce73 commit c333c87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/legacy_test/test_seed_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def check_static_result(self, place):
static.default_main_program(), fetch_list=res_list
)
self.assertEqual(
out1, np.asarray(self.rng1.random(), dtype=np.int32)
out1,
np.asarray(self.rng1.random()).astype(np.int32),
)

def test_static(self):
Expand Down
2 changes: 1 addition & 1 deletion test/xpu/test_increment_op_xpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def setUp(self):
self.initTestCase()

x = np.random.uniform(-100, 100, [1]).astype(self.dtype)
output = x + np.asarray(self.step, dtype=self.dtype)
output = x + np.asarray(self.step).astype(self.dtype)
output = output.astype(self.dtype)

self.inputs = {'X': x}
Expand Down

0 comments on commit c333c87

Please sign in to comment.