astropy/astropy — pull request #501 by wkerzendorf (2012-11-25 00:45:45+00:00)
Title: Adding Quantity-like arithmetic to NDData

Finally, I've had the time to start implementing the `Quantity`-like arithmetic. On the way I've changed a couple of other things

* Removed the `copy` kwarg as it's confusing and only applies to data and not to meta, uncertainty, ...
* changed `units` kwarg to `unit` as only one unit is given for the values in the data array
* added a ducktype for MaskedArray as `data` and splitting it into `mask` and `data`

For now one can add nddata + nddata; nddata + quantity (no reverse implemented yet). It's very simple for now and does not parse on any other attributes (meta, uncertainty, ...).

It will take the mask into account and act like an ma when adding (as the __array__) - it works as it is now, but I'm waiting for #500 which will make this code cleaner.