I have a y_actual array of size (1250, ) and a y_predicted array of size (1250,1).
I want to compute the absolute value of the difference between y_actual and y_predicted, that I achieve with : diff_y = np.abs(y_actual[:,] - y_predicted[:,0])
I would like to modify values is diff_y for the specific case where y_actual is > 0 and y_predicted is < 0. Let's assume I want to multiply it by 2. I made several unsuccessful attemps, like :
diff_y[y_actual[:,]> 0 and y_predicted[:,0] <0] *=2 but I don't succeed.
Any idea how to proceed ? Thx in advance
np.abs(y_actual - np.squeeze(y_predicted))for the first snippet.