Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[numpy] Fix users of NumPy APIs that are removed in NumPy 2.0. #732

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tensorflow_graphics/util/tests/asserts_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def test_select_eps_for_addition(self, dtype):
with self.assertRaises(tf.errors.InvalidArgumentError):
self.evaluate(tf.debugging.assert_equal(a, a + eps))

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

self.assertIs(vector_input, vector_output)

@parameterized.parameters((np.NaN,), (np.inf,))
@parameterized.parameters((np.nan,), (np.inf,))
def test_assert_no_infs_or_nans_raises_exception_for_nan(self, value):
"""Checks that the assert works for `Inf` or `NaN` values."""
vector_input = (value,)
Expand Down
Loading