xray-pydata/xray — pull request #125 by akleeman (2014-05-12 13:36:22+00:00)
Title: Only copy datetime64 data if it is using non-nanosecond precision.

In an attempt to coerce all datetime arrays to nano second resolutoin utils.as_safe_array() was creating copies of any datetime64 array (via the astype method). This was causing unexpected behavior (bugs) for things such as concatenation over times. (see below).

```
import xray
import pandas as pd

ds = xray.Dataset()
ds['time'] = ('time', pd.date_range('2011-09-01', '2011-09-11'))
times = [ds.indexed(time=[i]) for i in range(10)]
ret = xray.Dataset.concat(times, 'time')
print ret['time']

array(['1970-01-02T07:04:40.718526408-0800',
'1969-12-31T16:00:00.099966608-0800',
'1969-12-31T16:00:00.041748384-0800',
'1969-12-31T16:00:00.041748360-0800',
'1969-12-31T16:00:00.041748336-0800',
'1969-12-31T16:00:00.041748312-0800',
'1969-12-31T16:00:00.041748288-0800',
'1969-12-31T16:00:00.041748264-0800',
'1969-12-31T16:00:00.041748240-0800',
'1969-12-31T16:00:00.041748216-0800'], dtype='datetime64[ns]')
Attributes:
Empty
```