astropy/astropy — pull request #2285 by mhvk (2014-04-05 16:07:59+00:00)
Title: Make Quantity.__array_finalize__ duck type: copy _unit if it exists

Another `MaskedArray` related PR: masked arrays copy over all items in `__dict__` of whatever they are masking. For `Quantity`, this includes `_unit`. The class expects this to be copied back by `_array_finalize__` if a view is taken. Hence, this PR allows that. It also changes it for `Longitude._wrap_angle`. This already happens for `Column`, but not for some `io.fits` classes (@embray - you may want to consider this).