OK, it sounds like a popular change :).
I'll add relative error to the message as well. Please comment on the pull
request if you have strong feelings about exactly what it should look like.
On Wed, Dec 19, 2018 at 4:41 PM Juan Nunez-Iglesias
wrote:
> Another +1 on printing rtol, and +100 (can
Another +1 on printing rtol, and +100 (can I do that?) on the overall idea!
Thanks Stephan!
On Thu, Dec 20, 2018, at 7:27 AM, Christoph Deil wrote:
>
>
> > On 19. Dec 2018, at 19:50, Stefan van der Walt wrote:
> >
> > On Wed, 19 Dec 2018 09:47:01 -0800, Stephan Hoyer wrote:
> >> Example behav
> On 19. Dec 2018, at 19:50, Stefan van der Walt wrote:
>
> On Wed, 19 Dec 2018 09:47:01 -0800, Stephan Hoyer wrote:
>> Example behavior:
>>
> x = np.array([1, 2, 3])
> y = np.array([1, 2, 3.0001])
> np.testing.assert_allclose(x, y)
>> AssertionError:
>> Not equal to tolerance rtol
On Wed, 19 Dec 2018 09:47:01 -0800, Stephan Hoyer wrote:
> Example behavior:
>
> >>> x = np.array([1, 2, 3])
> >>> y = np.array([1, 2, 3.0001])
> >>> np.testing.assert_allclose(x, y)
> AssertionError:
> Not equal to tolerance rtol=1e-07, atol=0
>
> (mismatch 33.336%, maximum differenc
I have a PR up for review that adds "maximum difference" to the error
messages produced by NumPy's testing functions for comparing arrays:
https://github.com/numpy/numpy/pull/12591
Because this changes NumPy's public interface, I'm running it by the
mailing list to see if there are any objections