Skip to content

Commit 36e707f

Browse files
hawkinspcopybara-github
authored andcommitted
[numpy] Replace np.reshape(x, newshape=y) with np.reshape(x, y).
The `newshape` argument to reshape is removed in NumPy 2.4. PiperOrigin-RevId: 844383989
1 parent ad932c3 commit 36e707f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tensorflow_graphics/geometry/representation/mesh/tests/normals_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def test_face_normals_jacobian_random(self):
113113
vertex_init = np.random.random(size=tensor_vertex_shape + [3])
114114
index_init = np.arange(tensor_vertex_shape[-1])
115115
np.random.shuffle(index_init)
116-
index_init = np.reshape(index_init, newshape=[1] * \
116+
index_init = np.reshape(index_init, [1] * \
117117
(tensor_vertex_size - 1) + \
118118
[tensor_index_shape, 3])
119119
index_init = np.tile(index_init, tensor_vertex_shape[:-1] + [1, 1])
@@ -157,8 +157,7 @@ def test_face_normals_random(self):
157157
vertices = np.random.random(size=tensor_vertex_shape + [3])
158158
indices = np.arange(tensor_vertex_shape[-1])
159159
np.random.shuffle(indices)
160-
indices = np.reshape(indices,
161-
newshape=[1] * (tensor_vertex_size - 1) \
160+
indices = np.reshape(indices, [1] * (tensor_vertex_size - 1) \
162161
+ [tensor_index_shape, 3])
163162
indices = np.tile(indices, tensor_vertex_shape[:-1] + [1, 1])
164163
vertices[..., i] = 0.

0 commit comments

Comments
 (0)