Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
zoooo0820 committed Dec 29, 2023
1 parent c751c82 commit 51ccd89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/indexing/test_setitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def test_combined_index_1(self):
np_data = np_data + 1j * np_data

x = paddle.to_tensor(np_data, dtype=self.dtype)
np_data[[0, 1], :, [1, 2]] = 10.0
x[[0, 1], :, [1, 2]] = 10.0
np_data[[0, 1], :, [1, 2]] = 10
x[[0, 1], :, [1, 2]] = 10

if self.dtype == 'bfloat16':
x = paddle.cast(x, dtype='float32')
Expand All @@ -52,8 +52,8 @@ def test_combined_index_2(self):
np_data = np_data + 1j * np_data
x = paddle.to_tensor(np_data, dtype=self.dtype)

np_data[:, 1, [1, 2], 0] = 10.0
x[:, 1, [1, 2], 0] = 10.0
np_data[:, 1, [1, 2], 0] = 10
x[:, 1, [1, 2], 0] = 10

if self.dtype == 'bfloat16':
x = paddle.cast(x, dtype='float32')
Expand Down

0 comments on commit 51ccd89

Please sign in to comment.