- List item
->>> c = a.view()
>>> c is a
False
>>> c.base is a # c is a view of the data owned by a
True
>>> a.flags.owndata # a拥有数据
True
>>> c.flags.owndata # c并不拥有数据
False
>>>
>>> c.shape = 2,6 # a的形状并不随之改变
>>> a.shape
(3, 4)
>>> c[0,4] = 1234 # a的数据也会变
>>> a
array([[ 0, 1, 2, 3],
[1234, 5, 6, 7],
[ 8, 9, 10, 11]])