[Numpy-discussion] deprecations for 1.6; assert_almost_equal
Pauli Virtanen
pav@iki...
Mon Mar 7 03:10:20 CST 2011
Mon, 07 Mar 2011 11:03:17 +0800, Ralf Gommers wrote:
[clip]
> If anyone has new deprecations they want to put in for 1.6, discussing
> them now would be good. I found one item in Trac, #1543. The proposal in
> the ticket is to deprecate assert_almost_equal because it is quite badly
> behaved. This function is quite widely used however (also in scipy and
> presumably in third party code), so it will be a real pain if it starts
> spewing out warnings.
>
> I propose instead to just add a note at the top of the
> assert_almost_equal docstring that assert_array_max_ulp or
> assert_tol_equal (to be added from scipy.special in 1.6) should be used
> instead for new code.
Numpy 1.5 has `assert_allclose` which is functionally equivalent to the
proposed `assert_tol_equal`, so no new functions need to be added. I'm OK
with documentation-only recommendation.
Pauli
More information about the NumPy-Discussion
mailing list