[Numpy-discussion] allclose() does not check shape of inputs

2009-11-13 Thread Robert Cimrman
Hi, I think this is a bug: In [16]: np.allclose([1.0, 1.0], [1.1], rtol=0.1, atol=0.0) Out[16]: True Shall I create a ticket? r. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] allclose() does not check shape of inputs

2009-11-13 Thread Pauli Virtanen
Fri, 13 Nov 2009 11:54:51 +0100, Robert Cimrman wrote: > I think this is a bug: > > In [16]: np.allclose([1.0, 1.0], [1.1], rtol=0.1, atol=0.0) > Out[16]: True It's broadcasting. I'm not sure it is a bug: >>> np.allclose([1.0, 1.0], [1.1, 1.1, 1.1], rtol=0.1, atol=0.0) False -- Pauli Virtanen

Re: [Numpy-discussion] allclose() does not check shape of inputs

2009-11-13 Thread Robert Cimrman
Pauli Virtanen wrote: > Fri, 13 Nov 2009 11:54:51 +0100, Robert Cimrman wrote: >> I think this is a bug: >> >> In [16]: np.allclose([1.0, 1.0], [1.1], rtol=0.1, atol=0.0) >> Out[16]: True > > It's broadcasting. I'm not sure it is a bug: > np.allclose([1.0, 1.0], [1.1, 1.1, 1.1], rtol=0.1, a