@@ -5488,20 +5488,14 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5488
5488
return im
5489
5489
5490
5490
@staticmethod
5491
- def _pcolorargs (funcname , * args , ** kw ):
5492
- # This takes one kwarg, allmatch.
5493
- # If allmatch is True, then the incoming X, Y, C must
5494
- # have matching dimensions, taking into account that
5495
- # X and Y can be 1-D rather than 2-D. This perfect
5496
- # match is required for Gouroud shading. For flat
5497
- # shading, X and Y specify boundaries, so we need
5498
- # one more boundary than color in each direction.
5499
- # For convenience, and consistent with Matlab, we
5500
- # discard the last row and/or column of C if necessary
5501
- # to meet this condition. This is done if allmatch
5502
- # is False.
5503
-
5504
- allmatch = kw .pop ("allmatch" , False )
5491
+ def _pcolorargs (funcname , * args , allmatch = False ):
5492
+ # If allmatch is True, then the incoming X, Y, C must have matching
5493
+ # dimensions, taking into account that X and Y can be 1-D rather than
5494
+ # 2-D. This perfect match is required for Gouroud shading. For flat
5495
+ # shading, X and Y specify boundaries, so we need one more boundary
5496
+ # than color in each direction. For convenience, and consistent with
5497
+ # Matlab, we discard the last row and/or column of C if necessary to
5498
+ # meet this condition. This is done if allmatch is False.
5505
5499
5506
5500
if len (args ) == 1 :
5507
5501
C = np .asanyarray (args [0 ])
@@ -5548,7 +5542,7 @@ def _pcolorargs(funcname, *args, **kw):
5548
5542
'Incompatible X, Y inputs to %s; see help(%s)' % (
5549
5543
funcname , funcname ))
5550
5544
if allmatch :
5551
- if not (Nx == numCols and Ny == numRows ):
5545
+ if (Nx , Ny ) != ( numCols , numRows ):
5552
5546
raise TypeError ('Dimensions of C %s are incompatible with'
5553
5547
' X (%d) and/or Y (%d); see help(%s)' % (
5554
5548
C .shape , Nx , Ny , funcname ))
0 commit comments