I have an array inside an array. Normal array indexing fails to work in this case . One way i can solve this problem is that I can convert 'a' into list and then again convert it into an array --a two step process but i want to know is there any other way to slice it so that the structure of 'a' remains unchanged ?
a=np.array([[np.arange(3)],[np.arange(6,9)],[np.arange(11,14)]])
array([[[ 0, 1, 2]],
[[ 6, 7, 8]],
[[11, 12, 13]]])
a.shape
(3L, 1L, 3L)
a.ndim
3
type(a)
numpy.ndarray
Please help me on this.