title: How to replace a section of an array with another array [numpy]
body: <p>I'm trying to replace a section of an array with another array as follows:</p>
  
  <pre><code>data[1:-1,1:-1,1] = tmp_data
  </code></pre>
  
  <p><code>data[1:-1,1:-1,1]</code> and <code>tmp_data</code> are both of the same size. I'm getting this error message:</p>
  
  <pre><code>TypeError: 'tuple' object does not support item assignment
  </code></pre>
  
  <p>Why is this happening? How can I fix it? Thanks</p>