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

Fix step interpolation rounding for datetime #3958

Merged
merged 1 commit into from Sep 13, 2019

Conversation

randomstuff
Copy link
Contributor

@randomstuff randomstuff commented Sep 12, 2019

When interpolating datetime values in step(), the values where
converted in floating types: this causes a lack of precision in the
computation. Instead, we can do the computation in datetime64[ns].

Fixes #3878

When interpolating datetime values in step(), the values where
converted in floating types: this causes a lack of precision in the
computation. Instead, we can do the computation in datetime64[ns].
@randomstuff randomstuff force-pushed the datetime_step_interpolation branch from f1dff7f to 860373e Compare Sep 12, 2019
@randomstuff
Copy link
Contributor Author

randomstuff commented Sep 12, 2019

Updated the broken tests. They look a lot more sane now :)

@philippjfr philippjfr merged commit b20132f into holoviz:master Sep 13, 2019
1 of 2 checks passed
@philippjfr
Copy link
Member

philippjfr commented Sep 13, 2019

Hmm, actually looking back at this. The conversion to integers (and then floats) was initially added to avoid errors when using datetimes. I'm quite surprised this is working without that conversion now.

philippjfr pushed a commit that referenced this pull request Sep 20, 2019
When interpolating datetime values in step(), the values where
converted in floating types: this causes a lack of precision in the
computation. Instead, we can do the computation in datetime64[ns].
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

Successfully merging this pull request may close these issues.

'Pre' and 'post' step interpolations loose precision
2 participants