[Numpy-discussion] numpy.testing.asserts and masked array

josef.pktd at gmail.com josef.pktd at gmail.com
Fri Jan 16 11:28:08 EST 2009


On Fri, Jan 16, 2009 at 10:59 AM, Pierre GM <pgmdevlist at gmail.com> wrote:
>
> On Jan 16, 2009, at 10:51 AM, josef.pktd at gmail.com wrote:
>
>> I have a regression result with masked arrays that produces a masked
>> array output, estm5.yhat, and I want to test equality to the benchmark
>> case, estm1.yhat, with the asserts in numpy.testing, but I am getting
>> strange results.
>
>> ...
>> Whats the trick to assert_almost_equal for masked arrays?
>
> Us numpy.ma.testutils.assert_almost_equal instead.

Thanks, when I looked at the test files for mstats, I forgot to check
the imports.

Josef



More information about the NumPy-Discussion mailing list