astropy/astropy — pull request #835 by eteq (2013-02-28 16:17:39+00:00)
Title: Quantity accepts quantities

This makes a change to `Quantity` that rectifies something I've been finding quite annoying when using `Quantity` in science code: no easy way to convert from a sequence of scalar `Quantity` objects to a single `Quantity`. It adds something that works like this:

```
>>> qs = [30 * u.second, 1 * u.minute]
>>> qs
[, ]
>>> Quantity(qs, u.minute)

```
Which seems much more natural to me.

It also allows single scalar quantities in the `Quantity` constructor:
```
>>> Quantity(Quantity(60, u.second), u.minute)

```
That's not "recommended" usage because it duplicates `to`, and I thus have not put it in the narrative docs. But I think it should be in there to allow programmatic usage where another object might accept either numbers *or* `Quantity` objects.

cc @adrn @mdboom