From 30a1bbef623c35d2710954589974e408401f8035 Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Thu, 25 Jul 2024 11:03:09 -0700 Subject: [PATCH] [numpy] Fix users of NumPy APIs that are removed in NumPy 2.0. This change migrates users of APIs removed in NumPy 2.0 to their recommended replacements (https://numpy.org/devdocs/numpy_2_0_migration_guide.html). PiperOrigin-RevId: 656014404 Change-Id: I289f3fa71acf50a3df4d393ed8394a48181527db --- tf_agents/specs/tensor_spec_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tf_agents/specs/tensor_spec_test.py b/tf_agents/specs/tensor_spec_test.py index 545ec7f27..74024c512 100644 --- a/tf_agents/specs/tensor_spec_test.py +++ b/tf_agents/specs/tensor_spec_test.py @@ -444,7 +444,7 @@ def testFromSpec(self): self.assertEqual(expected_spec, spec) def testFromStringSpec(self): - spec = tensor_spec.from_spec(array_spec.ArraySpec([1], np.string_)) + spec = tensor_spec.from_spec(array_spec.ArraySpec([1], np.bytes_)) self.assertEqual(tf.string, spec.dtype)