Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatetimeIndex.values gives bad output #1779

Closed
ijmcf opened this issue Aug 17, 2012 · 1 comment
Closed

DatetimeIndex.values gives bad output #1779

ijmcf opened this issue Aug 17, 2012 · 1 comment

Comments

@ijmcf
Copy link

ijmcf commented Aug 17, 2012

For example:

dr = pandas.date_range('03/06/2012 00:00', periods=25, freq='W-FRI', tz='US/Eastern')
dr.values
array([1970-01-16 67:00:00, 1970-01-16 234:00:00, 1970-01-16 145:00:00,
1970-01-16 63:00:00, 1970-01-16 229:00:00, 1970-01-16 142:00:00,
1970-01-16 57:00:00, 1970-01-16 217:00:00, 1970-01-16 136:00:00,
1970-01-16 43:00:00, 1970-01-16 217:00:00, 1970-01-16 122:00:00,
1970-01-16 33:00:00, 1970-01-16 203:00:00, 1970-01-16 123:00:00,
1970-01-16 32:00:00, 1970-01-16 198:00:00, 1970-01-16 109:00:00,
1970-01-16 21:00:00, 1970-01-16 187:00:00, 1970-01-16 104:00:00,
1970-01-16 12:00:00, 1970-01-16 177:00:00, 1970-01-16 91:00:00,
1970-01-16 03:00:00], dtype=datetime64[ns])

This happens whether the DatetimeIndex was timezone aware or naive. On the other hand, converting to a list works fine:

list(dr)

@wesm
Copy link
Member

wesm commented Aug 17, 2012

This can't be fixed. It's a bug in NumPy 1.6.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants