未验证 提交 a34d85d9 编写于 作者: M mjxs 提交者: GitHub

np.unicode_ => np.str_ (#49975)

上级 a8078bbd
......@@ -41,7 +41,7 @@ class EagerStringTensorTestCase(unittest.TestCase):
self.assertEqual(ST2.name, "ST2")
self.assertEqual(ST2.shape, shape)
np.testing.assert_array_equal(
ST2.numpy(), np.empty(shape, dtype=np.unicode_)
ST2.numpy(), np.empty(shape, dtype=np.str_)
)
ST3 = core.eager.StringTensor(self.str_arr, "ST3") # constructor 3
......@@ -74,7 +74,7 @@ class EagerStringTensorTestCase(unittest.TestCase):
self.assertEqual(ST1.name, "ST1")
self.assertEqual(ST1.shape, shape)
np.testing.assert_array_equal(
ST1.numpy(), np.empty(shape, dtype=np.unicode_)
ST1.numpy(), np.empty(shape, dtype=np.str_)
)
ST2 = core.eager.StringTensor(self.str_arr, name="ST2") # constructor 3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册