I scale an numpy array like this using sklearn:
from sklearn.preprocessing import scale # Normalizing if normalize: for b in range(n_batches): for i