Feature scaling - used to normalize the range of data features.
Let's scale the feature between 0.0 and 1.0 .
from sklearn.preprocessing import MinMaxScaler
import numpy as np
def featureScaling(arr):
scaler = MinMaxScaler()
result = scaler.fit_transform(arr)
return result
# tests of your feature scaler--line below is input data
data = np.array([[640.], [1440.], [1920.]])
print(featureScaling(data))