astropy/astropy — pull request #1848 by mhvk (2013-11-30 03:46:37+00:00)
Title: Better use of __array_finalize__ and __array__ in quantity/longitude

While working on #1839, I realised `Longitude._wrap_angle` was not always updated whenever `_unit` was, and I tracked this down to a missing `__array_finalize__`; with that in place, `__getitem__` and `__getslice__` where no longer needed, so it simplified matters. Also changed how numpy scalars are handled: view them as an array using `__array__()` and then turn the view back into a `Quantity`.