astropy/astropy — pull request #1163 by astrofrog (2013-06-06 20:24:19+00:00)
Title: Fix bug in Quantity._decompose()

This fixes the following bug in ``Quantity._decompose``:

```
In [17]: q2 = np.array([1,2,3]) * u.m / (2. * u.km)

In [18]: q2.decompose()
Out[18]:

In [19]: q2.decompose()
Out[19]:

In [20]: q2.decompose()
Out[20]:
```

The original quantity is being modified every time ``decompose`` is called, because the code was incorrectly assuming the value was being copied, but it was being references for arrays.

@mdboom - can you review this?