Re: [Numpy-discussion] checking identity of arrays?

Feb. 23, 2001
3:51 p.m.
John J. Lee:
I must be missing something obvious: how does one check if two variables refer to the same array object?
Paul Dubois:
if a is b:
I thought he was asking something different. Suppose I do this: a = zeros(100) b = a[10:20] Now b is a view of a's data. Is there any way to test that a and b refer to the same data? (Even if this was not John's question, I'm curious to know the answer.)
8766
Age (days ago)
8766
Last active (days ago)
0 comments
1 participants
participants (1)
-
rlw@stsci.edu