On Jan 4, 2008 12:27 PM, Andrew Straw [EMAIL PROTECTED] wrote:
I have added a page to the wiki describing this issue:
http://scipy.org/numpy_warts_and_gotchas
I'll link it into the main documentation pages over the next few days,
but I ask for a review the following text for correctness and
I have added a page to the wiki describing this issue:
http://scipy.org/numpy_warts_and_gotchas
I'll link it into the main documentation pages over the next few days,
but I ask for a review the following text for correctness and clarity:
(You can simply edit the wiki page or post your reply here
Thanks, I updated the page.
Charles R Harris wrote:
On Jan 4, 2008 12:27 PM, Andrew Straw [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
I have added a page to the wiki describing this issue:
http://scipy.org/numpy_warts_and_gotchas
I'll link it into the main
Apologies if I've missed the discussion of this, but I was recently
surprised by the following behavior (in svn trunk 4673). The following
code runs without triggering the assertion.
import numpy as np
print np.__version__
a=np.int32(42)
b=np.array([],dtype=np.int32)
assert np.allclose(a,b)
Is
Andrew Straw wrote:
Apologies if I've missed the discussion of this, but I was recently
surprised by the following behavior (in svn trunk 4673). The following
code runs without triggering the assertion.
import numpy as np
print np.__version__
a=np.int32(42)
b=np.array([],dtype=np.int32)
On Jan 3, 2008 1:06 PM, Robert Kern [EMAIL PROTECTED] wrote:
Andrew Straw wrote:
Apologies if I've missed the discussion of this, but I was recently
surprised by the following behavior (in svn trunk 4673). The following
code runs without triggering the assertion.
import numpy as np
On Thu, 3 Jan 2008, Charles R Harris apparently wrote:
Isn't it trivially true that all elements of an empty
array are close to any number?
Sure, but might not one expect a ValueError due to
shape mismatch? (Doesn't allclose usually use
normal broadcasting rules?)
Cheers,
Alan Isaac
Hi,
import numpy as np
print np.__version__
a=np.int32(42)
b=np.array([],dtype=np.int32)
assert np.allclose(a,b)
Is this expected behavior of numpy or is this a bug I should report?
Bug, I think.
I think this bug - which may be mine - follows from this line in allclose:
On Thu, 3 Jan 2008, Charles R Harris apparently wrote:
Isn't it trivially true that all elements of an empty
array are close to any number?
On Thu, 3 Jan 2008, Alan G Isaac apparently wrote:
Sure, but might not one expect a ValueError due to
shape mismatch? (Doesn't allclose usually use
Just to ask - is there a reason why this:
In [39]: all([])
Out[39]: True
is the case?
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
On Jan 3, 2008 2:37 PM, Matthew Brett [EMAIL PROTECTED] wrote:
Just to ask - is there a reason why this:
In [39]: all([])
Out[39]: True
is the case?
Because it's True. Anything is true about the elements of an empty set,
because there aren't any. In this case, all asks if all elements
So, currently we have all and allclose giving the same answer:
In [19]: a = array([])
In [20]: b = array([1])
In [21]: all(a == b)
Out[21]: True
In [22]: allclose(a, b)
Out[22]: True
Would we want the answers to be different?
___
Numpy-discussion
Matthew Brett wrote:
So, currently we have all and allclose giving the same answer:
In [19]: a = array([])
In [20]: b = array([1])
In [21]: all(a == b)
Out[21]: True
In [22]: allclose(a, b)
Out[22]: True
Would we want the answers to be different?
No. I wasn't thinking correctly,
So, currently we have all and allclose giving the same answer:
In [19]: a = array([])
In [20]: b = array([1])
In [21]: all(a == b)
Out[21]: True
In [22]: allclose(a, b)
Out[22]: True
Would we want the answers to be different?
No. I wasn't thinking correctly, previously.
Matthew Brett wrote:
So, currently we have all and allclose giving the same answer:
In [19]: a = array([])
In [20]: b = array([1])
In [21]: all(a == b)
Out[21]: True
In [22]: allclose(a, b)
Out[22]: True
Would we want the answers to be different?
No. I wasn't thinking
15 matches
Mail list logo