astropy/astropy — pull request #3192 by mhvk (2014-12-10 15:49:58+00:00)
Title: When taking array.view(Quantity), initialise unit to dimensionless

This follows up on a suggestion in #3174 (https://github.com/astropy/astropy/issues/3174#issuecomment-65680651) to ensure that if one takes a view of an array, the unit is not left uninitialised (as is currently the case), but rather set to dimensionless (as would happen to if just fed through `Quantity(array)`. So,
```
In [1]: import astropy.units as u, numpy as np

In [2]: np.arange(3.).view(u.Quantity)
Out[2]:
```
where before one had
```
In [2]: np.arange(3.).view(u.Quantity)
Out[2]:
```