-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
test decoding num_dates in float types #1863
Conversation
For comparison, I added the same test to the
|
I believe the issue originates in these lines: Lines 174 to 175 in ac854f0
where we multiply the If flat_num_dates = np.arange(100).astype('float32')
n = 1e9
roundtripped = (flat_num_dates * n).astype(np.int64) / n
assert np.all(flat_num_dates == roundtripped) By the way, the factor has to be large, like The weird thing is that the corresponding code in the current Lines 151 to 152 in 50b0a69
I will look into why the result is still different from Also, if this really is the origin of the error, there are two easy ways to avoid this:
|
Haha, OK, this is actually what you implemented in 50b0a69: Lines 32 to 37 in 50b0a69
So that is why it works now. Case closed, I guess. |
Nice, thank you @j08lue for tracking this down and adding tests! |
v0.10.0
and current base