a = np.array([]) # Your values np.interp(a, (a.min(), a.max()), (-1, +1))
abs_max = np.amax(np.abs(unnormalized_array)) normalized_array = unnormalized_array * (4.0 / abs_max)