Ich bin neu in der Verwendung von numpy und eine Sache, die ich wirklich nicht verstehe, ist die Indizierung von Arrays.Indizierung mit booleschen Arrays in multidimensionale Arrays mit numpy
Im tentative tutorial gibt es dieses Beispiel:
>>> a = arange(12).reshape(3,4)
>>> b1 = array([False,True,True]) # first dim selection
>>> b2 = array([True,False,True,False]) # second dim selection
>>>
>>> a[b1,b2] # a weird thing to do
array([ 4, 10])
Ich habe keine Ahnung, warum es funktioniert das letzte, was. Kann mir das jemand erklären?
Danke!
+1 Hier ist ein Link zum Weiterlesen, http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html –