Suppose I have an array like:
from numpy import array
a = array([[[1,2,3]]])
How can I make right indexing to get a view array like:
array([[[1,3]]])
There is a np.delete function. Unlike the list remove it does not act in place. Instead it returns a new array. And like your simple solution, it generates an index containing the items to keep (just does so for more general conditions).
In [1222]: np.delete(a,1,-1)
Out[1222]: array([[[1, 3]]])
delete code is rather long, but pure Python. So it can be instructive reading.
You could also use indexing:
In [1]: a = np.array([[[1,2,3]]])
In [2]: a[:,:,::2]
Out[2]: array([[[1, 3]]])
Explanation: The first two : make sure you keep the whole two first dimensions, i.e., the outer two brackets. ::2 iterates over the innermost/third dimension and skips every second value.