matplotlib/matplotlib — pull request #1546 by gustavla (2012-11-30 01:46:02+00:00)
Title: Quiver crashes if given matrices

As it is now, quiver() fails if you give it numpy.matrix objects, as this simple example shows:

>>> quiver(np.matrix(np.ones((32, 32))), np.matrix(np.ones((32, 32))))

It does so because it runs ravel() on the input, which if the input is a matrix gives a row matrix of shape (N, 1), instead of an array of shape (N,), which is what quiver expects in further calculations.

This pull request fixes this problem by running the input through np.asarray() before ravel() is called.