astropy/astropy — pull request #1936 by mhvk (2013-12-30 23:16:40+00:00)
Title: Import units on top so u.day, etc., can be used throughout

Partially inspired by the speed penalty for initialising `TimeDelta` from a quantity (#1933), this PR imports `units` on top, and removes all use of strings for units. With it,
```
from astropy.time import TimeDelta; import astropy.units as u
%timeit TimeDelta(10.*u.us)
# 1000 loops, best of 3: 300 us per loop
```
This is 24.4 ms in current master, and was 463 us before the problematic advising for units was introduced (#1870).