Skip to content

Commit c559944

Browse files
hawkinspLIT team
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: 840374478
1 parent 670600b commit c559944

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lit_nlp/lib/image_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def overlay_pixel_saliency(image_str: str, saliency: np.ndarray, cm_name: str,
134134
alphas = map(lambda e: abs(e - 0.5) * 2, norm_saliency.flatten())
135135
else:
136136
alphas = map(lambda e: 1.0 - e, norm_saliency.flatten())
137-
alphas = np.reshape(list(alphas), newshape=norm_saliency.shape)
137+
alphas = np.reshape(list(alphas), norm_saliency.shape)
138138
else:
139139
alphas = 1.0
140140

0 commit comments

Comments
 (0)