astropy/astropy — pull request #1148 by mhvk (2013-06-03 18:48:05+00:00)
Title: Correction for on input that has __getitem__ but cannot be subscripted

@taldcroft: With the new `__getitem__` implementation, the following did not work any more:
```
from astropy.time import Time
import numpy as np
mjd = np.arange(50000,50010)
Time(mjd[0], format='mjd', scale='utc')
```
returns
```
ERROR: IndexError: invalid index to scalar variable. [astropy.time.core]
```
This is because a `mjd[0]` returns a scalar that still has a `__getitem__`, but is not subscriptable.

This pull request resolves this (and adds a test to `test_basic.py` to ensure this does not recur).