Skip to content

Commit

Permalink
Fix test for numpy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Sep 30, 2024
1 parent d3671cf commit 443284f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keras/src/ops/image_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def _compute_affine_transform_coordinates(image, transform):
# transform the indices
coordinates = np.einsum("Bhwij, Bjk -> Bhwik", indices, transform)
coordinates = np.moveaxis(coordinates, source=-1, destination=1)
coordinates += np.reshape(a=offset, newshape=(*offset.shape, 1, 1, 1))
coordinates += np.reshape(offset, newshape=(*offset.shape, 1, 1, 1))
if need_squeeze:
coordinates = np.squeeze(coordinates, axis=0)
return coordinates
Expand Down

0 comments on commit 443284f

Please sign in to comment.