When will numpy copy the array when using reshape()
<p>In the document of <code>numpy.reshape</code>, it says:</p>

<blockquote>
  <p>This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array.</p>
</blockquote>

<p>My question is, when will numpy chooses to return a new view, and when to copy the whole array? Is there any general principles telling people about the behavior of <code>reshape</code>, or it is just unpredictable? Thanks.</p>