astropy/astropy — pull request #266 by mdboom (2012-06-08 14:12:44+00:00)
Title: Add an __array__ method to make NDData

This makes them easier to plot in matplotlib, such as:

```
In [1]: from astropy.nddata import nddata

In [2]: x = nddata.NDData([[0, 1, 2], [4, 5, 6], [7, 8, 9]], mask=[[False, True, True], [True, True, False], [True, True, True]])

In [3]: from matplotlib import pyplot as plt

In [4]: plt.imshow(x, interpolation='nearest')
Out[4]:

In [5]: plt.show()
```

Note, this creates zero dependency on matplotlib.

Inspired by the mailing list thread "NDData plot proposal"