astropy/astropy — pull request #1313 by iguananaut (2013-08-01 20:56:33+00:00)
Title: Adds rudimentary __str__ and __repr__ representations for NDData objects...

Currently `NDData` doesn't have any useful string representation. In this implementation its `__str__` exactly the same a that for a normal Numpy ndarray. The `__repr__` is the same too but it shows that the class is `NDData` instead of `ndarray`.

These can and should be extended in the future to display things like units, and maybe even the metadata. But for now it's better than nothing (if anyone has any immediate ideas I can add them to this PR).