title: What is the difference between contiguous and non-contiguous arrays?
body: <p>In the <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html" rel="noreferrer">numpy manual</a> about the reshape() function, it says </p>
  
  <pre><code>&gt;&gt;&gt; a = np.zeros((10, 2))
  # A transpose make the array non-contiguous
  &gt;&gt;&gt; b = a.T
  # Taking a view makes it possible to modify the shape without modifying the
  # initial object.
  &gt;&gt;&gt; c = b.view()
  &gt;&gt;&gt; c.shape = (20)
  AttributeError: incompatible shape for a non-contiguous array
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li>What are continuous and noncontiguous arrays? Is it similar to the contiguous memory block in C like <a href="https://stackoverflow.com/questions/4059363/what-is-a-contiguous-memory-block">What is a contiguous memory block?</a> </li>
  <li>Is there any performance difference between these two? When should we use one or the other?</li>
  <li>Why does transpose make the array non-contiguous?</li>
  <li>Why does <code>c.shape = (20)</code> throws an error <code>incompatible shape for a non-contiguous array</code>?</li>
  </ol>
  
  <p>Thanks for your answer!</p>