File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -597,8 +597,9 @@ def render_images(
597597 n_steps = len (sdata .plotting_tree .keys ())
598598
599599 for element , param_values in params_dict .items ():
600- # When norm is a list, per-channel norms are stored separately in ImageRenderParams.norms
601- # and _prepare_cmap_norm receives None so it creates a default (unused) norm.
600+ # Per-channel norms are stored in ImageRenderParams.norms. In that case
601+ # _prepare_cmap_norm gets None and creates a default norm used as fallback
602+ # for the single-channel rendering path.
602603 scalar_norm = None if isinstance (norm , list ) else norm
603604 cmap_params : list [CmapParams ] | CmapParams
604605 if isinstance (cmap , list ):
Original file line number Diff line number Diff line change @@ -1201,6 +1201,8 @@ def _additive_blend(
12011201 reasonable result by extracting each cmap's contribution relative to its
12021202 own background.
12031203 """
1204+ if not layers :
1205+ raise ValueError ("Cannot blend an empty set of layers." )
12041206 height , width = next (iter (layers .values ())).shape
12051207 zero_colors = np .array ([cm (0.0 )[:3 ] for cm in channel_cmaps ])
12061208 canvas = np .mean (zero_colors , axis = 0 )
You can’t perform that action at this time.
0 commit comments