@@ -5243,20 +5243,14 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
52435243 return im
52445244
52455245 @staticmethod
5246- def _pcolorargs (funcname , * args , ** kw ):
5247- # This takes one kwarg, allmatch.
5248- # If allmatch is True, then the incoming X, Y, C must
5249- # have matching dimensions, taking into account that
5250- # X and Y can be 1-D rather than 2-D. This perfect
5251- # match is required for Gouroud shading. For flat
5252- # shading, X and Y specify boundaries, so we need
5253- # one more boundary than color in each direction.
5254- # For convenience, and consistent with Matlab, we
5255- # discard the last row and/or column of C if necessary
5256- # to meet this condition. This is done if allmatch
5257- # is False.
5258-
5259- allmatch = kw .pop ("allmatch" , False )
5246+ def _pcolorargs (funcname , * args , allmatch = False ):
5247+ # If allmatch is True, then the incoming X, Y, C must have matching
5248+ # dimensions, taking into account that X and Y can be 1-D rather than
5249+ # 2-D. This perfect match is required for Gouroud shading. For flat
5250+ # shading, X and Y specify boundaries, so we need one more boundary
5251+ # than color in each direction. For convenience, and consistent with
5252+ # Matlab, we discard the last row and/or column of C if necessary to
5253+ # meet this condition. This is done if allmatch is False.
52605254
52615255 if len (args ) == 1 :
52625256 C = np .asanyarray (args [0 ])
@@ -5303,7 +5297,7 @@ def _pcolorargs(funcname, *args, **kw):
53035297 'Incompatible X, Y inputs to %s; see help(%s)' % (
53045298 funcname , funcname ))
53055299 if allmatch :
5306- if not (Nx == numCols and Ny == numRows ):
5300+ if (Nx , Ny ) != ( numCols , numRows ):
53075301 raise TypeError ('Dimensions of C %s are incompatible with'
53085302 ' X (%d) and/or Y (%d); see help(%s)' % (
53095303 C .shape , Nx , Ny , funcname ))
0 commit comments