Skip to content

Commit

Permalink
[numpy] Fix test failures under NumPy 2.2.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 704330083
  • Loading branch information
hawkinsp authored and tensorflower-gardener committed Dec 9, 2024
1 parent 06e37bf commit f786954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tf_keras/constraints_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def test_min_max_norm(self):
normed = norm_instance(backend.variable(array))
value = backend.eval(normed)
l2 = np.sqrt(np.sum(np.square(value), axis=0))
assert not l2[l2 < m]
assert not l2[l2 > m * 2 + 1e-5]
assert l2[l2 < m].size == 0
assert l2[l2 > m * 2 + 1e-5].size == 0

def test_conv2d_radial_constraint(self):
for width in (3, 4, 5, 6):
Expand Down

0 comments on commit f786954

Please sign in to comment.