Skip to content

Commit da69a42

Browse files
author
Sonja Stockhaus
committed
fix label color vector dtype for int annotation
1 parent 1bd9237 commit da69a42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spatialdata_plot/pl/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ def _map_color_seg(
811811
if isinstance(color_vector, pd.Series):
812812
color_vector = color_vector.to_numpy()
813813
# normalize only the not nan values, else the whole array would contain only nan values
814-
normed_color_vector = color_vector.copy()
814+
normed_color_vector = color_vector.copy().astype(float)
815815
normed_color_vector[~np.isnan(normed_color_vector)] = cmap_params.norm(
816816
normed_color_vector[~np.isnan(normed_color_vector)]
817817
)

0 commit comments

Comments
 (0)