On Wednesday 07 February 2007 23:09:16 Travis Oliphant wrote:
> > So, there's no real point in using the Python 'id' function ? Do we need
> > a shortcut to __array_interface__['data'] as id number ?
>
> You have it (sort of a short-cut).
>
> .ctypes.data
OK, great, thanks a lot
On Wednesday 07 F
Pierre GM wrote:
> I want to compare whether two arrays point to the same data.
Travis just posted a note about a couple utility functions that may help:
Travis Oliphant wrote:
> In SVN there is a new function may_share_memory(a,b) which will return
> True if the memory foot-print of the two ar
Pierre GM wrote:
> On Wednesday 07 February 2007 22:38:30 Robert Kern wrote:
>> Pierre GM wrote:
>>> All,
>>>
>>> I want to compare whether two arrays point to the same data.
>>> I've been using 'is' so far, but I'm wondering whether it's the right
>>> approach.
>> It isn't. Your analysis is correc
Pierre GM wrote:
> On Wednesday 07 February 2007 22:38:30 Robert Kern wrote:
>
>> Pierre GM wrote:
>>
>>> All,
>>>
>>> I want to compare whether two arrays point to the same data.
>>> I've been using 'is' so far, but I'm wondering whether it's the right
>>> approach.
>>>
>> It isn't.
On Wednesday 07 February 2007 22:38:30 Robert Kern wrote:
> Pierre GM wrote:
> > All,
> >
> > I want to compare whether two arrays point to the same data.
> > I've been using 'is' so far, but I'm wondering whether it's the right
> > approach.
>
> It isn't. Your analysis is correct.
So, there's no
Pierre GM wrote:
> All,
>
> I want to compare whether two arrays point to the same data.
> I've been using 'is' so far, but I'm wondering whether it's the right
> approach.
It isn't. Your analysis is correct.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless
All,
I want to compare whether two arrays point to the same data.
I've been using 'is' so far, but I'm wondering whether it's the right
approach.
If x is a plain ndarray, `x is x`, and `x is not x.view()`. I understand the
second one (I think so...), `x` and `x.view `are two different Python