astropy/astropy — pull request #1434 by eteq (2013-09-10 21:48:18+00:00)
Title: change quantity repr to act more like ndarray's repr

This PR changes `__repr__` on `Quantity` to more closely match the behavior of numpy arrays. This is particularly important for arrays. For example, the old behavior (without this PR):
```
In [1]: randn(10) * u.m
Out[1]:

```
While this PR changes it to look like:
```
In [1]: randn(10) * u.m
Out[1]:

```
The difference is minor, but I think the latter is more readable, particularly because the latter case properly accounts for the width of a terminal (while the former does not)

Note that this makes the significant change of no longer using `str` to generate the representation of value of the quantity. I think this is a *good* thing, because by design, `__str__` and `__repr__` are different methods to be used in different situations. This is of particular relevance for `astropy.coordinates.Angle`, which currently prints something like:
```
In [1]: Angle([1,2,3.5],'hr')
Out[1]:
```
but after this PR, it looks like:
```
In [1]: Angle([1,2,3.5],'hr')
Out[1]:
```
(note that this probably renders #1322 no longer relevant)

cc @mdboom @taldcroft @astrofrog @adrn