From 443284f57b1a105561f9774825784e835cc51048 Mon Sep 17 00:00:00 2001 From: Francois Chollet Date: Mon, 30 Sep 2024 14:42:11 -0700 Subject: [PATCH] Fix test for numpy 2 --- keras/src/ops/image_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keras/src/ops/image_test.py b/keras/src/ops/image_test.py index bcf42b533a8..7f346abca96 100644 --- a/keras/src/ops/image_test.py +++ b/keras/src/ops/image_test.py @@ -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