[Numpy-discussion] `allclose` vs `assert_allclose`

alex argriffi at ncsu.edu
Fri Jul 18 21:56:41 EDT 2014


On Fri, Jul 18, 2014 at 9:47 PM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
>
>
>
> On Fri, Jul 18, 2014 at 2:32 PM, Chris Barker <chris.barker at noaa.gov> wrote:
>>
>> On Fri, Jul 18, 2014 at 12:43 PM, Pauli Virtanen <pav at iki.fi> wrote:
>>>
>>> 18.07.2014 22:13, Chris Barker kirjoitti:
>>> [clip]
>>> > but an appropriate rtol would work there too. If only zero testing is
>>> > needed, then atol=0 makes sense as a default. (or maybe atol=eps)
>>>
>>> There's plenty of room below eps, but finfo(float).tiny ~ 3e-308 (or
>>> some big multiple) is also reasonable in the scale-freeness sense.
>>
>>
>> right! brain blip -- eps is the difference between 1 and then next larger
>> representable number, yes? So a long way away from smallest representable
>> number. So yes, zero or [something]e-308 -- making zero seem like a good
>> idea again....
>>
>> is it totally ridiculous to have the default be dependent on dtype?
>> float32 vs float64?
>>
>
> Whatever the final decision is, if the defaults change we should start with
> a FutureWarning. How we can make that work is uncertain, because I don't
> know of any reliable way to detect if we are using the default value or if a
> value was passed in.

There are tricks like http://stackoverflow.com/questions/12265695, not
that I'm suggesting to do that.



More information about the NumPy-Discussion mailing list