File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -951,8 +951,9 @@ def show(
951951 if wanted_labels_on_this_cs :
952952 if (table := params_copy .table_name ) is not None :
953953 keys = [params_copy .color ] if not isinstance (params_copy .color , list ) else params_copy .color
954+ assert len (keys ) == 1
954955 colors = sc .get .obs_df (sdata [table ], keys )
955- if isinstance (colors .dtype , pd .CategoricalDtype ):
956+ if isinstance (colors [ keys [ 0 ]] .dtype , pd .CategoricalDtype ):
956957 _maybe_set_colors (
957958 source = sdata [table ],
958959 target = sdata [table ],
Original file line number Diff line number Diff line change @@ -454,9 +454,10 @@ def _render_points(
454454
455455 if col_for_color is not None :
456456 keys = [col_for_color ] if not isinstance (col_for_color , list ) else col_for_color
457+ assert len (keys ) == 1
457458 cols = sc .get .obs_df (adata , keys )
458459 # maybe set color based on type
459- if isinstance (cols .dtype , pd .CategoricalDtype ):
460+ if isinstance (cols [ keys [ 0 ]] .dtype , pd .CategoricalDtype ):
460461 _maybe_set_colors (
461462 source = adata ,
462463 target = adata ,
You can’t perform that action at this time.
0 commit comments