-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Failing statsmodels tests on pandas master vs. 0.12.0 #5312
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
Comments
when did this start failing? |
Somewhere between master and 0.12.0. |
what I mean is I tests statsmodels 5.0 with master maybe 1 month ago and these were fine. |
None of this code has changed in statsmodels. I see these failure with 0.5.0 against pandas master. |
Something in numpy?
|
Sorry, I've been bug hunting all week and don't have time to track this one down at the moment. |
1st issue: I think your the pandas converters are a little more strict on how they convert, that's why I think this is raising. in statsmodels/iolib/foreign.py:genfromdta
|
No, this was deliberate in the test suite since this is a valid date in the stata epoch time. It used to round trip fine from this
|
2nd is an out of bounds on the dates (which again is not actually checked, in 0.12 it was possible to have an out-of-bounds date slip thru). You can catch this error.
|
ok....1st is a bug....have a PR to fix, easy 2nd is more troublesome, you are adding a Timestamp with an offset then yields an out-of-bounds Timestamp. We normally raise on this. You could catch it and just use it as a datetime if you want.
|
I'm trying to figure out if this second test was always broken. AFAIK, this is not the expected result and what it used to do, but I'm not certain yet. I need to build everything in a virtualenv to test. |
ok....going to merge the first fix, but leave this issue open...lmk |
Yeah, this one used to work too.
|
|
pls take a look here...the reason this breaks is I put in a change to wrap the returns the applying an offset in a Timestamp, I think @Cancan01 was a test breaking because it was assumed it was a timestamp. easy to fix this to have it return a timestamp and if its out-of-bounds the datetime. any problems with that? |
Timestamp is a datetime but with additional methods, right? So, if you assume you'll get a datetime, everything you could do with that datetime you can do with the timestamp? |
@jtratner that is true, I am not sure of the guarantees before, but @Cancan01 PR had a failing test that assumed it was getting a Timestamp, I think because of a repeated offset apply, e.g. something like
|
EAFP - try to be nice and keep it within range and if not return a datetime and let the failure happen later - feels the same as automatically converting an integer column to float if you add nan or add 0.1 to it, or converting indexes on slicing, etc. |
https://launchpadlibrarian.net/154849014/buildlog_ubuntu-trusty-i386.statsmodels_0.6.0~ppa18~revno-1486~ubuntu14.04.1_UPLOADING.txt.gz
Did something change?
The text was updated successfully, but these errors were encountered: