The simplest example of a view is given by a slice of an array:
M = array([[1.,2.],[3.,4.]]) v = M[0,:] # first row of M
The preceding slice v is a view of M. It shares the same data as M. Modifying v will modify M as well:
v[-1] = 0. v # array([[1.,0.]]) M # array([[1.,0.],[3.,4.]]) # M is modified as well
It is possible to access the object that owns the data using the array attribute base:
v.base # array([[1.,0.],[3.,4.]]) v.base is M # True
If an array owns its data, the attribute base is None:
M.base # None