Skip to content

Commit 320e782

Browse files
hawkinspcopybara-github
authored andcommitted
[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: 655956468
1 parent 77773cb commit 320e782

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_graphics/util/tests/asserts_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def test_select_eps_for_addition(self, dtype):
347347
with self.assertRaises(tf.errors.InvalidArgumentError):
348348
self.evaluate(tf.debugging.assert_equal(a, a + eps))
349349

350-
@parameterized.parameters((np.NaN,), (np.inf,))
350+
@parameterized.parameters((np.nan,), (np.inf,))
351351
@flagsaver.flagsaver(tfg_add_asserts_to_graph=False)
352352
def test_assert_no_infs_or_nans_passthrough(self, value):
353353
"""Checks that the assert is a passthrough when the flag is False."""
@@ -357,7 +357,7 @@ def test_assert_no_infs_or_nans_passthrough(self, value):
357357

358358
self.assertIs(vector_input, vector_output)
359359

360-
@parameterized.parameters((np.NaN,), (np.inf,))
360+
@parameterized.parameters((np.nan,), (np.inf,))
361361
def test_assert_no_infs_or_nans_raises_exception_for_nan(self, value):
362362
"""Checks that the assert works for `Inf` or `NaN` values."""
363363
vector_input = (value,)

0 commit comments

Comments
 (0)