-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
COMPAT: Floating point fractional hours for timedeltas gives unexpected precision issue #9048
Comments
Test-case code:
|
Here is where to change: https://github.com/pydata/pandas/blob/master/pandas/tslib.pyx#L2448 prob need a few tests for this though (and this also affects datetimes as well, e.g. you can use |
I have had a look at it, but for some reason am struggling with recompiling. |
don't use pip. This gets you all the deps This gets you the build deps To build |
It builds, but I cannot load the compiled modules within the git directory without some more magic. After build_ext –inplace, import pandas hangs (eating a lot of memory). I am on Windows using VS2010 compiler. I have limited time the next days to look at this, and I have a full reinstall coming up soon, so I won’t worry too much about it now. |
you cannot use the VS 2010 compiler as python doesn't support it (except for >= 3.3.). use the recipe I show above. which works on all pythons and doesn't depend on your environment. |
I see much higher precision:
The discussion above makes me think this is either long-sinced fixed of platform-specific. Could use a test. |
Creating a timedelta with fractional hours gives an unexpected large round-off error.
This is indicates a precision around 2x10^-7 ( 1/(1000_60_60) ), which is less than a single precision float.
The text was updated successfully, but these errors were encountered: