[Numpy-discussion] recent changes in np.maximum.accumulate ?

josef.pktd at gmail.com josef.pktd at gmail.com
Tue Feb 18 11:29:25 EST 2020


On Tue, Feb 18, 2020 at 10:43 AM Sebastian Berg <sebastian at sipsolutions.net>
wrote:

> On Tue, 2020-02-18 at 10:14 -0500, josef.pktd at gmail.com wrote:
> > I'm trying to track down test failures of statsmodels against recent
> > master dev versions of numpy and scipy.
> >
> > The core computation is the following in one set of tests that fail
> >
> >         pvals_corrected_raw = pvals * np.arange(ntests, 0, -1)
> >         pvals_corrected = np.maximum.accumulate(pvals_corrected_raw)
> >
>
> Hmmm, the two git hashes indicate few changes between the two versions
> (mainly unicode related).
>
> However, recently there was also the addition of AVX-512F loops to
> maximum, so that seems like the most reasonable candidate (although I
> am unsure it changed exactly between those versions, it is also more
> complex maybe due to needing a machine that supports the instructions).
>
> Some details about the input could be nice. But if this is all that is
> as input, it sounds like it should be a contiguous array? I guess it
> might include subnormal numbers or NaN?
>

The test failures are on a Travis machine
https://travis-ci.org/statsmodels/statsmodels/jobs/650430129

I can extract the numbers and examples from the unit test on my Windows
computer.
But, if it's machine dependent, then that might not be enough.

The main reason why maximum.accumulate might be the problem is that in some
tests
we don't get monotonically increasing values, e.g.

E            x: array([0.012, 0.02 , 0.024, 0.024, 0.02 , 0.012])
E            y: array([0.012, 0.02 , 0.024, 0.024, 0.024, 0.024])

first row is computed, second row is expected

Josef



>
> Can you open an issue with some of those details if you have them?
>
> - Sebastian
>
>
>
> > this numpy version
> > numpy-1.19.0.dev0%2B20200214184618_1f9ab28-cp38-cp38-
> > manylinux2010_x86_64.whl
> > is in the test run with failures (the first time statsmodel master
> > failed)
> >
> > the previous version in the test runs didn't have these failures
> >  numpy-1.19.0.dev0%2B20200212232857_af0dfce-cp38-cp38-
> > manylinux1_x86_64.whl
> >
> >
> > I'm right now just fishing for candidates for the failures. And I'm
> > not running any dev versions on my computer.
> >
> > Were there any recent changes that affect np.maximum.accumulate?
> >
> > Josef
> >
> >
> >
> > _______________________________________________
> > NumPy-Discussion mailing list
> > NumPy-Discussion at python.org
> > https://mail.python.org/mailman/listinfo/numpy-discussion
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20200218/4bc83e76/attachment-0001.html>


More information about the NumPy-Discussion mailing list