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

Daehyok Shin sdhyok at email.unc.edu
Fri Oct 13 20:25:53 EDT 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