Skip to content

Commit a34d85d

Browse files
authored
np.unicode_ => np.str_ (#49975)
1 parent a8078bb commit a34d85d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/paddle/fluid/tests/unittests/test_egr_string_tensor_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_constructor_with_args(self):
4141
self.assertEqual(ST2.name, "ST2")
4242
self.assertEqual(ST2.shape, shape)
4343
np.testing.assert_array_equal(
44-
ST2.numpy(), np.empty(shape, dtype=np.unicode_)
44+
ST2.numpy(), np.empty(shape, dtype=np.str_)
4545
)
4646

4747
ST3 = core.eager.StringTensor(self.str_arr, "ST3") # constructor 3
@@ -74,7 +74,7 @@ def test_constructor_with_kwargs(self):
7474
self.assertEqual(ST1.name, "ST1")
7575
self.assertEqual(ST1.shape, shape)
7676
np.testing.assert_array_equal(
77-
ST1.numpy(), np.empty(shape, dtype=np.unicode_)
77+
ST1.numpy(), np.empty(shape, dtype=np.str_)
7878
)
7979

8080
ST2 = core.eager.StringTensor(self.str_arr, name="ST2") # constructor 3

0 commit comments

Comments
 (0)