Re: [Numpy-discussion] [SciPy-User] Congratulations to Chris Barker...

2015-03-02 Thread Charles R Harris
On Mon, Mar 2, 2015 at 5:51 PM, Nathaniel Smith  wrote:

> On Mon, Mar 2, 2015 at 2:57 PM, Stephan Hoyer  wrote:
> > Indeed, congratulations Chris!
> >
> > Are there plans to write a vectorized version for NumPy? :)
>
> np.isclose isn't identical, but IIRC the only difference is the defaults.
>
>
There are two differences I saw. Numpy requires the error to be less than
the sum of the relative and absolute errors, the pep uses the maximum of
the two. The other is that numpy as a key word for nans to compare equal.

Chuck
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-User] Congratulations to Chris Barker...

2015-03-02 Thread Chris Barker - NOAA Federal
>> Are there plans to write a vectorized version for NumPy? :)
>
> np.isclose isn't identical, but IIRC the only difference is the defaults.

There are subtle differences in the algorithm as well. But not enough
that it makes sense to change the numpy one.

The results will be similar in most cases, and identical fir a
relative tolerance less than 1e-8 (for float64).

-Chris


> -n
>
> --
> Nathaniel J. Smith -- http://vorpus.org
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-User] Congratulations to Chris Barker...

2015-03-02 Thread Nathaniel Smith
On Mon, Mar 2, 2015 at 2:57 PM, Stephan Hoyer  wrote:
> Indeed, congratulations Chris!
>
> Are there plans to write a vectorized version for NumPy? :)

np.isclose isn't identical, but IIRC the only difference is the defaults.

-n

-- 
Nathaniel J. Smith -- http://vorpus.org
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-User] Congratulations to Chris Barker...

2015-03-02 Thread Stephan Hoyer
Indeed, congratulations Chris!

Are there plans to write a vectorized version for NumPy? :)

On Mon, Mar 2, 2015 at 2:28 PM, Nathaniel Smith  wrote:

> ...on the acceptance of his PEP! PEP 485 adds a math.isclose function
> to the standard library, encouraging people to do numerically more
> reasonable floating point comparisons.
>
> The PEP:
>   https://www.python.org/dev/peps/pep-0485/
>
> The pronouncement:
>   http://thread.gmane.org/gmane.comp.python.devel/151776/focus=151778
>
> -n
>
> --
> Nathaniel J. Smith -- http://vorpus.org
> ___
> SciPy-User mailing list
> scipy-u...@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion