def normalize(xs):
x_min, x_max = np.min(xs), np.max(xs)<EOL>return (xs - x_min) / (x_max - x_min)<EOL>
Restrict xs into the interval (0, 1) via a linear transformation
as long as len(xs) > 1, 0 and 1 will be elements of the resulting array