Obviously, there is some ambiguity in the interpretation of the index [[1, 0]]. Perhaps the same is discussed here:
Extended slice when passing a list instead of a tuple in numpy
I will try another array to see if this is clear.
In [312]: D2=np.array([[0,0],[1,1],[2,2]])
In [313]: D2
Out[313]:
array([[0, 0],
[1, 1],
[2, 2]])
In [316]: D2[[[1,0,0]]]
Out[316]:
array([[1, 1],
[0, 0],
[0, 0]])
In [317]: _.shape
Out[317]: (3, 2)
: ... , (1,3)
In [318]: D2[[[1,0,0]],:]
Out[318]:
array([[[1, 1],
[0, 0],
[0, 0]]])
In [319]: _.shape
Out[319]: (1, 3, 2)
In [320]: D2[np.array([[1,0,0]])]
Out[320]:
array([[[1, 1],
[0, 0],
[0, 0]]])
In [321]: _.shape
Out[321]: (1, 3, 2)
, , (3,1,2)
In [323]: D2[np.array([[1,0,0]]).T,:]
...
In [324]: _.shape
Out[324]: (3, 1, 2)
: ..., , [], 1- :
In [330]: D2[[1,0,0]].shape
Out[330]: (3, 2)
In [331]: D2[[[1,0,0]]].shape
Out[331]: (3, 2)
In [333]: D2[[[[1,0,0]]]].shape
Out[333]: (1, 3, 2)
In [334]: D2[[[[[1,0,0]]]]].shape
Out[334]: (1, 1, 3, 2)
In [335]: D2[np.array([[[[1,0,0]]]])].shape
Out[335]: (1, 1, 1, 3, 2)
, . , "": D2[(1,2)] D2[1,2]. numpy (numeric) [] .
:
, - .
a ... - D2[[[0,1]]] D2[([0,1],)].
@eric/s seburg
- ( length <= np.MAXDIMS, , None ).
[[1,2]] - 1 , , .. ([1,2],). [[1,2]],... .