Skip to content

ds['time.time'] is broken #367

Description

@shoyer

As noted in #364:

In [32]: t = pd.date_range('2000-01-01', periods=10, freq='H')

In [33]: time = xray.DataArray(t, name='time', dims='time')

In [34]: time['time.time']
Out[34]:
<xray.DataArray 'time' (time: 10)>
array(['1999-12-31T16:00:00.000000000-0800',
       '1999-12-31T17:00:00.000000000-0800',
       '1999-12-31T18:00:00.000000000-0800',
       '1999-12-31T19:00:00.000000000-0800',
       '1999-12-31T20:00:00.000000000-0800',
       '1999-12-31T21:00:00.000000000-0800',
       '1999-12-31T22:00:00.000000000-0800',
       '1999-12-31T23:00:00.000000000-0800',
       '2000-01-01T00:00:00.000000000-0800',
       '2000-01-01T01:00:00.000000000-0800'], dtype='datetime64[ns]')
Coordinates:
  * time     (time) datetime64[ns] 2000-01-01 2000-01-01T01:00:00 ...

It should return an array of datetime.time objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions