1
Ich möchte Indizes des Arrays wie x = np.array([[1, 1, 1], [2, 2, 2]])
wo Elemente gleich y = np.array([1, 1, 1])
. Also tat ich das:Wie arbeite ich mit numpy.where?
In: np.where(x == y)
Out: (array([0, 0, 0]), array([0, 1, 2]))
Es ist die richtige Antwort. Aber ich erwarte, nur den Index 0
zu bekommen, weil das Nullelement von x
gleich y
ist.