import numpy as np def NormalizeData(data): return (data - np.min(data)) / (np.max(data) - np.min(data))
range(N, -1, -1) is better