def _check_xyz(self, args):
<EOL>x = self.ax.convert_xunits( args[<NUM_LIT:0>] )<EOL>y = self.ax.convert_yunits( args[<NUM_LIT:1>] )<EOL>x = np.asarray(x, dtype=np.float64)<EOL>y = np.asarray(y, dtype=np.float64)<EOL>z = ma.asarray(args[<NUM_LIT:2>], dtype=np.float64)<EOL>if z.ndim != <NUM_LIT:2>:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>else: Ny, Nx = z.shape<EOL>if x.shape == z.shape and y.shape == z.shape:<EOL><INDENT>return x,y,z<EOL><DEDENT>if x.ndim != <NUM_LIT:1> or y.ndim != <NUM_LIT:1>:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>nx, = x.shape<EOL>ny, = y.shape<EOL>if nx != Nx or ny != Ny:<EOL><INDENT>raise TypeError("<STR_LIT>" +<EOL>"<STR_LIT>")<EOL><DEDENT>x,y = np.meshgrid(x,y)<EOL>return x,y,z<EOL>
For functions like contour, check that the dimensions
of the input arrays match; if x and y are 1D, convert
them to 2D using meshgrid.

Possible change: I think we should make and use an ArgumentError
Exception class (here and elsewhere).