Change values of a 1D numpy array based on certain condition
I found another answer:
A = np.where(A < 0, A + 5, A)
Very basic question:
Suppose I have a 1D numpy array (A) containing  5 elements:
A = np.array([ -4.0,  5.0,  -3.5,  5.4,  -5.9])
I need to add, 5 to all the elements of A that are lesser than zero. What is the numpy way to do this without for-looping ?