File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ def to_rgba_array(c, alpha=None):
248248 # Note that this occurs *after* handling inputs that are already arrays, as
249249 # `to_rgba(c, alpha)` (below) is expensive for such inputs, due to the need
250250 # to format the array in the ValueError message(!).
251- if isinstance (c , str ) and c . lower () == "none" :
251+ if cbook . _str_lower_equal (c , "none" ) :
252252 return np .zeros ((0 , 4 ), float )
253253 try :
254254 return np .array ([to_rgba (c , alpha )], float )
Original file line number Diff line number Diff line change @@ -861,7 +861,7 @@ def get_marker(self):
861861
862862 def get_markeredgecolor (self ):
863863 mec = self ._markeredgecolor
864- if isinstance (mec , six . string_types ) and mec == 'auto' :
864+ if cbook . _str_equal (mec , 'auto' ) :
865865 if rcParams ['_internal.classic_mode' ]:
866866 if self ._marker .get_marker () in ('.' , ',' ):
867867 return self ._color
@@ -1125,8 +1125,8 @@ def set_markeredgecolor(self, ec):
11251125 """
11261126 if ec is None :
11271127 ec = 'auto'
1128- if self ._markeredgecolor is None or \
1129- np .any (self ._markeredgecolor != ec ):
1128+ if ( self ._markeredgecolor is None
1129+ or np .any (self ._markeredgecolor != ec ) ):
11301130 self .stale = True
11311131 self ._markeredgecolor = ec
11321132
Original file line number Diff line number Diff line change @@ -882,7 +882,7 @@ def validate_cycler(s):
882882
883883
884884def validate_hist_bins (s ):
885- if isinstance (s , six . string_types ) and s == ' auto' :
885+ if cbook . _str_equal (s , " auto" ) :
886886 return s
887887 try :
888888 return int (s )
You can’t perform that action at this time.
0 commit comments