title: NumPy equivalent of Matlab's magic()
body: <p>In Ocatave / Matlab, I can use <a href="https://mathworks.com/help/matlab/ref/magic.html" rel="noreferrer"><code>magic()</code></a> to get a magic square, e.g.,</p>
  
  <pre><code>magic(4)
  
    16    2    3   13
     5   11   10    8
     9    7    6   12
     4   14   15    1
  </code></pre>
  
  <p>Definition: A magic square is an N×N grid of numbers in which the entries in each row, column and main diagonal sum to the same number (equal to <code>N(N^2+1)/2</code>).</p>
  
  <p>How can I generate the same using NumPy?</p>