Skip to content

MAINT: fix numpy deprecation warnings - #2490

Merged
josef-pkt merged 5 commits into
statsmodels:masterfrom
josef-pkt:numpy_deprecation_2480
Jul 1, 2015
Merged

josef-pkt merged 5 commits into
statsmodels:masterfrom
josef-pkt:numpy_deprecation_2480

Conversation

@josef-pkt

Copy link
Copy Markdown
Member

see #2480 enabling deprecation warnings creates many of them from numpy, mostly non-integers

I'm using Python 3.4, and need TravisCI to check the changes.
I didn't manage to find the sources of all deprecation warnings yet

Note: This are not all innocent changes,
There are possible problems related to integer division and rounding (int conversion), but the test suite never had failures.

  • I replaced division / by // in some cases which was inconsistent across python 2 versus python 3
  • I converted some attributes like nobs from float to int, and added from __future__ import division to several but not all modules.

@josef-pkt josef-pkt added this to the 0.7 milestone Jul 1, 2015
@josef-pkt
josef-pkt force-pushed the numpy_deprecation_2480 branch from 5468d98 to 36651f5 Compare July 1, 2015 04:26
@josef-pkt

Copy link
Copy Markdown
Member Author

I had forgotten to add several modules with changes to the commit, amended and force pushed

@josef-pkt
josef-pkt force-pushed the numpy_deprecation_2480 branch from afc8dba to b4ed011 Compare July 1, 2015 16:44
@josef-pkt

Copy link
Copy Markdown
Member Author

interactive rebase to remove one extra file from first commit

@josef-pkt

Copy link
Copy Markdown
Member Author

Good, all numpy warnings are gone. Disable warnings again and then it should be ready for merge.

We have a bit of test noise, where we get warnings. However, the warnings are not the same for all versions, so there might be some work there. (So, we shouldn't silence warnings in unit tests only if we are sure it's expected.)

@josef-pkt

Copy link
Copy Markdown
Member Author

looks good merging

josef-pkt added a commit that referenced this pull request Jul 1, 2015
MAINT/REF: fix numpy deprecation warnings closes #2480
@josef-pkt
josef-pkt merged commit 13a96f1 into statsmodels:master Jul 1, 2015
@josef-pkt
josef-pkt deleted the numpy_deprecation_2480 branch July 27, 2015 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant