File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -362,9 +362,7 @@ def to_rgba_array(c, alpha=None):
362
362
pass
363
363
364
364
if isinstance (c , str ):
365
- raise ValueError ("Using a string of single character colors as "
366
- "a color sequence is not supported. The colors can "
367
- "be passed as an explicit list instead." )
365
+ raise ValueError (f"{ c !r} is not a valid color value." )
368
366
369
367
if len (c ) == 0 :
370
368
return np .zeros ((0 , 4 ), float )
Original file line number Diff line number Diff line change @@ -1253,8 +1253,7 @@ def test_to_rgba_array_single_str():
1253
1253
1254
1254
# single char color sequence is invalid
1255
1255
with pytest .raises (ValueError ,
1256
- match = "Using a string of single character colors as "
1257
- "a color sequence is not supported." ):
1256
+ match = "'rgb' is not a valid color value." ):
1258
1257
array = mcolors .to_rgba_array ("rgb" )
1259
1258
1260
1259
You can’t perform that action at this time.
0 commit comments