title: IndexError: boolean index did not match indexed array along dimension 1; dimension is 3 but corresponding boolean dimension is 10
body: <p>How should I fix this error?</p>
  
  <pre><code>dhidden[hidden &lt;= 0] = 0
  </code></pre>
  
  <p>Gives me the error:</p>
  
  <pre><code>IndexError: boolean index did not match indexed array along dimension 1; dimension is 3 but corresponding boolean dimension is 10
  </code></pre>
  
  <p>More info:</p>
  
  <pre><code> print(type(hidden))
  &lt;class 'numpy.ndarray'&gt;
   print(type(hidden))
  
  &lt;class 'numpy.ndarray'&gt; 
  print(dhidden.shape)
  (5, 3)
   print(hidden.shape)
  (5, 10)
  </code></pre>
  
  <p>hidden.dtype and dhidden.dtype are float64</p>
  
  <p>I tried     dhidden[hidden &lt;= 0.0] = 0.0 and still get the same error.</p>