On Mon, Mar 5, 2012 at 1:29 PM, Keith Goodman <kwgood...@gmail.com> wrote:

>
> I[8] np.allclose(a, a[0])
> O[8] False
> I[9] a = np.ones(100000)
> I[10] np.allclose(a, a[0])
> O[10] True
>
>
One disadvantage of using a[0] as a proxy is that the result depends on the
ordering of a

  (a.max() - a.min()) < epsilon

is an alternative that avoids this.  Another good use case for a minmax
func.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to