Terry Reedy :
> On 2/22/2015 4:25 PM, Marko Rauhamaa wrote:
>> This is a true statement:
>>
>> If X is Y, then id(X) == id(Y).
>>
>> However, this is generally not a true statement:
>>
>> If X is Y, then id(X) is id(Y).
>
> If X and Y exist at the *same time*, then (X is Y) == (id(X) is id
On 02/22/2015 10:02 PM, Terry Reedy wrote:
On 2/22/2015 4:25 PM, Marko Rauhamaa wrote:
LJ :
id(b[0])
4582
[...]
id(b[2])
4582
Please correct me if I am wrong, but according to this b[2] and b[0]
are the same object. Now,
b[0] is b[2]
False
This is a true statement:
If
On 2/22/2015 12:53 PM, LJ wrote:
Hi everyone. Quick question here. Lets suppose if have the
following numpy array:
b=np.array([[0]*2]*3)
and then:
id(b[0])
4582
id(b[1])
45857512
id(b[2])
4582
Please correct me if I am wrong,
You are, as other explained
> but according to th
On 2/22/2015 4:25 PM, Marko Rauhamaa wrote:
LJ :
id(b[0])
4582
[...]
id(b[2])
4582
Please correct me if I am wrong, but according to this b[2] and b[0]
are the same object. Now,
b[0] is b[2]
False
This is a true statement:
If X is Y, then id(X) == id(Y).
However, this
LJ wrote:
> Hi everyone. Quick question here. Lets suppose if have the following numpy
> array:
>
> b=np.array([[0]*2]*3)
>
> and then:
>
id(b[0])
> 4582
id(b[1])
> 45857512
id(b[2])
> 4582
>
> Please correct me if I am wrong, but according to this b[2] and b[0] are
> th
On Mon, Feb 23, 2015 at 8:25 AM, Marko Rauhamaa wrote:
> This is a true statement:
>
>If X is Y, then id(X) == id(Y).
>
> However, this is generally not a true statement:
>
>If X is Y, then id(X) is id(Y).
Irrelevant, because the identities of equal integers didn't come into this.
ChrisA
LJ :
id(b[0])
> 4582
[...]
id(b[2])
> 4582
>
> Please correct me if I am wrong, but according to this b[2] and b[0]
> are the same object. Now,
>
b[0] is b[2]
> False
This is a true statement:
If X is Y, then id(X) == id(Y).
However, this is generally not a true statem
Ooops, I missed the numpy, so I thought that it was the contents
of the array that was causing the problem. My very bad. Apologies.
Laura
--
https://mail.python.org/mailman/listinfo/python-list
On 02/22/2015 09:53 AM, LJ wrote:
Hi everyone. Quick question here. Lets suppose if have the following numpy
array:
b=np.array([[0]*2]*3)
and then:
id(b[0])
4582
id(b[1])
45857512
id(b[2])
4582
Please correct me if I am wrong, but according to this b[2] and b[0] are the
same o
On Mon, Feb 23, 2015 at 5:13 AM, Laura Creighton wrote:
> In a message of Sun, 22 Feb 2015 09:53:33 -0800, LJ writes:
>>Hi everyone. Quick question here. Lets suppose if have the following numpy
>>array:
>>
>>b=np.array([[0]*2]*3)
>>
>>and then:
>>
> id(b[0])
>>4582
> id(b[1])
>>45857
In a message of Sun, 22 Feb 2015 09:53:33 -0800, LJ writes:
>Hi everyone. Quick question here. Lets suppose if have the following numpy
>array:
>
>b=np.array([[0]*2]*3)
>
>and then:
>
id(b[0])
>4582
id(b[1])
>45857512
id(b[2])
>4582
>
>Please correct me if I am wrong, but ac
Hi everyone. Quick question here. Lets suppose if have the following numpy
array:
b=np.array([[0]*2]*3)
and then:
>>> id(b[0])
4582
>>> id(b[1])
45857512
>>> id(b[2])
4582
Please correct me if I am wrong, but according to this b[2] and b[0] are the
same object. Now,
>>> b[0] is b[2]
12 matches
Mail list logo