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

date2index is buggy when used with dates outside the support. #30

Closed
dopplershift opened this issue Feb 26, 2014 · 2 comments
Closed

date2index is buggy when used with dates outside the support. #30

dopplershift opened this issue Feb 26, 2014 · 2 comments

Comments

@dopplershift
Copy link
Member

From david.huard on December 02, 2009 14:11:05

Using a date before the first date in the time variable returns index -1.
Using a date after the last date in the time variable raises an error.

I've fixed this by replacing indices == -1 by 0, and those equal to N by
N-1, where N is the length of the time variable.

If this is OK with you, I'll commit those changes and the accompanying tests.

Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=30

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on December 02, 2009 13:56:08

Sounds good to me - thanks David.

@dopplershift
Copy link
Member Author

From david.huard on February 08, 2010 07:59:42

Fixed in r838

Status: Fixed

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

No branches or pull requests

1 participant