i have a list with entries where some of them can be 0 - now i want to invert this list and replace the "undefined entries" - where 1/0 occurs with 0 - unfortunately this does not work:
noise_term = 1.0/np.sqrt(A*g)
if noise_term.any() != 0:
noise_term = noise_term
else:
noise_term = 0
what is the best way to solve this? i have also thought about doing this with while: True?
thank you in advance