On Jun 30, 2015 9:01 PM, <josef.p...@gmail.com> wrote: > > I'm trying to fix some code in statsmodels that creates Deprecation Warnings from numpy > > Most of it are quite easy to fix, mainly cases where we use floats to avoid integer division > > I have two problems > > first, I get Deprecation warnings in the test run that don't specify where they happen. > I try to find them with file searches, but I don't see a `np.ones` that might cause a problem > (needle in a haystack: Close to 4000 unittests and more than 100,000 lines of numpython) > Also, I'm not sure the warnings are only from statsmodels, they could be in numpy, scipy or pandas, couldn't they? > > > second, what's wrong with non-integers in `np.r_[[np.nan] * head, x, [np.nan] * tail]` (see below) > > I tried to set the warnings filter to `error` but then Python itself errored right away.
I'd try using a more targeted error filter. Python trends to spit out a bunch of ImportWarnings on startup. You can make a warnings filter that does "error" but only for DeprecationWarning. Or only for DeprecationWarning matching the regexp "non-integer". -n
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion