[Numpy-discussion] inconsistency in np.isclose

Nathaniel Smith njs at pobox.com
Thu Jan 14 20:09:26 EST 2016


Yeah, that does look like a bug.

On Thu, Jan 14, 2016 at 4:48 PM, Andrew Nelson <andyfaff at gmail.com> wrote:
> Hi all,
> I think there is an inconsistency with np.isclose when I compare two
> numbers:
>
>>>> np.isclose(0, np.inf)
> array([False], dtype=bool)
>
>>>> np.isclose(0, 1)
> False
>
> The first comparison returns a bool array, the second returns a bool.
> Shouldn't they both return the same result?
>
> --
> _____________________________________
> Dr. Andrew Nelson
>
>
> _____________________________________
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
Nathaniel J. Smith -- http://vorpus.org



More information about the NumPy-Discussion mailing list