matplotlib/matplotlib — pull request #1471 by astrofrog (2012-11-09 12:40:03+00:00)
Title: Improved checking logic of _check_xyz in contour.py

At the moment, if one calls ``contour`` with:

```
contour(x,y,z)
```

and ``x`` and ``y`` are 2-d arrays with a different shape from ``z``, the error is

```
raise TypeError("Inputs x and y must be 1D or 2D.")
```

which caused me much confusion. I dug into the code, and I realized the logic and errors could be significantly improved, so I've done that here, and added some tests. It should now give more informative/relevant errors.