[Numpy-discussion] [Q]Best way for an array operation?

Daehyok Shin sdhyok at email.unc.edu
Fri Oct 13 19:25:53 CDT 2000


What is the best Numpy way for the following work?

for i in range(len(x)):
    if x[i] > 0:
        y[i] = v[i]
        z[i] = u[i]+2

Daehyok Shin (Peter)





More information about the Numpy-discussion mailing list