title: Centering a Numpy array of images
body: <p>I have some numpy arrays of images that I want to center (subtract the mean and divide by the standard deviation). Can I simply do it like this?</p>
  
  <pre><code># x is a np array
  img_mean = x.mean(axis=0)
  img_std = np.std(x)
  x = (x - img_mean) / img_std
  </code></pre>