@@ -559,11 +559,6 @@ def __call__(self, X, alpha=None, bytes=False):
559559 """
560560 if not self ._isinit :
561561 self ._init ()
562- # Calculations with native byteorder are faster, and avoid a
563- # bug that otherwise can occur with putmask when the last
564- # argument is a numpy scalar.
565- if not xa .dtype .isnative :
566- xa = xa .byteswap ().newbyteorder ()
567562
568563 mask_bad = X .mask if np .ma .is_masked (X ) else np .isnan (X ) # Mask nan's.
569564 xa = np .array (X , copy = True )
@@ -595,7 +590,7 @@ def __call__(self, X, alpha=None, bytes=False):
595590 lut .take (xa , axis = 0 , mode = 'clip' , out = rgba )
596591
597592 if alpha is not None :
598- if not cbook .iterable (alpha ):
593+ if not np .iterable (alpha ):
599594 if alpha < 0 or alpha > 1 :
600595 raise ValueError ("alpha must be in [0, 1];"
601596 " found %s" % alpha )
@@ -620,7 +615,7 @@ def __call__(self, X, alpha=None, bytes=False):
620615 elif mask_bad :
621616 rgba [..., :] = (0 , 0 , 0 , 0 )
622617
623- if not cbook .iterable (X ):
618+ if not np .iterable (X ):
624619 rgba = tuple (rgba )
625620 return rgba
626621
0 commit comments