[Numpy-discussion] fancy view question

Pauli Virtanen pav@iki...
Tue Feb 17 09:19:05 CST 2009


Tue, 17 Feb 2009 10:15:19 -0500, josef.pktd wrote:
[clip]
> I'm still learning about views:
[clip: c = foo(a); c.flags.owndata]
> Does OWNDATA : True  mean it made a copy? 

Yes. But owndata==False does not mean no copy was made (since the result 
could be a view to a temporary array).

> Or is there another way to check whether it's a view or a copy?

c.base is a

-- 
Pauli Virtanen



More information about the Numpy-discussion mailing list