I have a 2D numpy array of size [N, M] = A.I'm trying to select an element from each row based on some criteria.I already have all the indices in an array of size [N, 1] = B, where each element in this array is in [0, M).That is, each number in B indicates the position of the element in each row to be selected.I've already tried A[B], but it didn't work as expected.
↧