MAINT: Replace WarningManager with catch_warnings and other numpy 1.14.0 issues#4205
Conversation
b983160 to
9c020e0
Compare
1 similar comment
|
Hmmm... looks like appveyor is still unhappy. I think it may have something to do with the upgraded numpy... I’ll take a peek. |
|
Are there a lot of failures with the latest numpy 1.14? |
| filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), | ||
| "stata_lbw_glm.csv") | ||
| data=np.recfromcsv(open(filename, 'rb'), converters={4: lambda s: s.strip(asbytes("\""))}) | ||
| data=np.recfromcsv(open(filename, 'rb')) |
There was a problem hiding this comment.
Not sure why, but when you have converters, numpy 1.14.0 drops the column. So I think this is an easy workaround. Probably not perfect.
See the linked numpy issue I opened.
|
|
||
| s = str(rslt1) | ||
| assert_equal(s.startswith('A 5x5 contingency table with counts:\n[[ 8.'), True) | ||
| assert_equal(s.startswith('A 5x5 contingency table with counts:'), True) |
There was a problem hiding this comment.
numpy 1.14.0 seems to remove the leading space between the \n[[ and the 8.. I'm just going to check the text matches and the first element of the 2 dimensional array matches.
dc5196a to
815edd0
Compare
|
Ugh... I got the annoying |
|
Hmm... there's another it seems you can no longer do My guess is that it would just be easier to use pandas for this... Otherwise, I'd have to do something like
I'll play with that shortly. |
|
I'm giving up on our rec array usage! We have to fix something with each numpy version (or new numpy/pandas interaction for them) I would like to drop rec array usage and support completely in 0.10, but if some changes that we need for compatibility fixes are easier by dropping them right away, then we can do so. This is especially true for changes in our "old" testing code. |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #4205 +/- ##
==========================================
- Coverage 79.52% 79.51% -0.01%
==========================================
Files 561 561
Lines 83693 83690 -3
Branches 9552 9552
==========================================
- Hits 66553 66550 -3
Misses 14955 14955
Partials 2185 2185
Continue to review full report at Codecov.
|
|
Ok this looks decent to me. The coveralls fail is irrelevant. Thoughts? Let me know if you want me to squash. |
|
Looks very good to me, it's all in unit tests. Squashing would make it nicer. @thequackdaddy Thanks a lot for working through this |
Used np.vectorize to strip the excess string identfiers and switch from string check to integer check for counts. Replaced rec.array with pd.DataFrame... life is easier.
cd003f3 to
bb8fba9
Compare
|
merging |
I think bumpy's WarningManager has gone the way of the Monty Python parrot.
This is causing AppVeyor to not run.