Hi,
I’d like to ask if it is possible in python to use vector operations to do:
p = np.zeros(m)
for i in range(m):
if(e[i] >= 0.9):
p[i] = 1
else:
p[i] = 0
Something like that maybe (except in a way that would work?)
np.where(e >= 0.9, p = 1, p = 0)
BR,
Adam
(I changed variable name in case someone was going to use it in the final assignment as an answer)
Linked question (vector operation on 2d arr vs 1d) Is it possible to write all loops as vector operation? - #2 by TMosh