astropy/astropy — pull request #2395 by mwcraig (2014-04-30 19:38:00+00:00)
Title: Fix errors in NDData related to uncertainty propagation and copies by reference

- [ ] Move ``CHANGES.rst`` entries to the 0.3.3 section once it exists.

The two relevant issues are #2393 and #2394. In summary:

- uncertainties underwent no unit conversion in ``_arithmetic`` and ``convert_unti_to`` (#2393)
- Most members are copied by reference; in ``_arithmetic`` and ``convert_unit_to`` the ``result`` ought to be decoupled from the input. (#2394)

This PR fixes both.

Note that it does *not* change the ``__init__`` method of ``NDData``, which deliberately creates new copies by reference. That behavior is unchanged (and this is not a proposal to change it).

Also note that the same copy-by-reference issue is almost certainly present for ``.wcs`` and ``.flags``. That is not addressed here.