Nov-01-2020, 11:57 PM
Suppose
y_i
is a matrix such that y_i=np.linspace(np.zeros(d),np.ones(d),m+1)That is, each column is an array given by
np.linspace(0,1,m+1)
and the entries between 0 and 1, i.e. the first and last row, might be assigned different values in a later statement. Then for y
being an array of random points, I'd like to know, for each column of the matrix y_i
the index of the number greater than or equal to a random point in y
. In other words, I'd like to get a matrix of indices of shape (len(y),d)
.