From 8cf16c8f69c4f21075494381de23802f662fe839 Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Fri, 5 Dec 2025 06:21:55 -0800 Subject: [PATCH] [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: 840699507 --- lit_nlp/lib/image_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lit_nlp/lib/image_utils.py b/lit_nlp/lib/image_utils.py index 579752f3..0f1c13e4 100644 --- a/lit_nlp/lib/image_utils.py +++ b/lit_nlp/lib/image_utils.py @@ -134,7 +134,7 @@ def overlay_pixel_saliency(image_str: str, saliency: np.ndarray, cm_name: str, alphas = map(lambda e: abs(e - 0.5) * 2, norm_saliency.flatten()) else: alphas = map(lambda e: 1.0 - e, norm_saliency.flatten()) - alphas = np.reshape(list(alphas), newshape=norm_saliency.shape) + alphas = np.reshape(list(alphas), norm_saliency.shape) else: alphas = 1.0