title: Numpy, the array doesn't have its own data?
body: <p>I tried to use <code>resize</code> on an array in this way:</p>
  
  <pre><code>a = np.array([1,2,3,4,5,6], dtype=np.uint8)
  a.resize(4,2)
  print a 
  </code></pre>
  
  <p>and the output is Ok!(I meant that there was no error). But when I run this code:</p>
  
  <pre><code>a = np.array([1,2,3,4,5,6], dtype=np.uint8).reshape(2,3)
  a.resize(4,2)
  print a 
  </code></pre>
  
  <p>it gave rise to an error, saying that, <code>ValueError: cannot resize this array: it does not own its data</code></p>
  
  <p><strong>My question:</strong> why after applying <code>reshape</code> the ownership of array is changed? The ownership is granted to whom !? The <code>reshape</code> does not create a new memory and it is performing its operation on the same array memory! So why the ownership will change?</p>
  
  <p>I read <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html#numpy.reshape" rel="noreferrer">np.reshape</a> and <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.resize.html#numpy.ndarray.resize" rel="noreferrer">ndarray.resize</a> doc but I can not understand the reason. I read <a href="https://stackoverflow.com/questions/15424211/transfer-ownership-of-numpy-data">this post</a>. I can check <code>ndarray.flags</code> always before applying the <code>resize</code> method.</p>