title: How to standard scale a 3D matrix?
body: <p>I am working on a signal classification problem and would like to scale the dataset matrix first, but my data is in a 3D format (batch, length, channels).<br>
  I tried to use Scikit-learn Standard Scaler:</p>
  
  <pre><code>from sklearn.preprocessing import StandardScaler
  sc = StandardScaler()
  X_train = sc.fit_transform(X_train)
  X_test = sc.transform(X_test)
  </code></pre>
  
  <p>But I've got this error message:</p>
  
  <blockquote>
    <p>Found array with dim 3. StandardScaler expected &lt;= 2</p>
  </blockquote>
  
  <p>I think one solution would be to split the matrix by each channel in multiples 2D matrices, scale them separately and then put back in 3D format, but I wonder if there is a better solution.<br>
  Thank you very much.</p>