Skip to content

Commit df347bf

Browse files
committed
refactor(points): drop no-op inverse.reshape(-1)
np.unique(return_inverse=True) already yields a 1-D inverse for the 1-D color_vector, so reshape(-1) was a no-op. Output unchanged (6-scenario parity holds).
1 parent 407b494 commit df347bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/spatialdata_plot/pl/render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ def _render_points(
13451345
# category), so strip alpha on the unique values and map back rather than
13461346
# calling the per-string parser once per point.
13471347
unique_hex, inverse = np.unique(color_vector, return_inverse=True)
1348-
color_vector = np.asarray([_hex_no_alpha(c) for c in unique_hex])[inverse.reshape(-1)]
1348+
color_vector = np.asarray([_hex_no_alpha(c) for c in unique_hex])[inverse]
13491349

13501350
shade_how = render_params.density_how if render_params.density else "linear"
13511351
# Plain density (no color column) must use the user-facing cmap as a sequential

0 commit comments

Comments
 (0)