title: Matlab wrapToPi and python np.unwrap
body: <p>I am trying to port my code from Matlab to Python.
  Most of it seems to work except Matlab's function</p>
  
  <pre><code>wrapToPi
  </code></pre>
  
  <p>I am using numpy's unwrap function</p>
  
  <pre><code>np.unwrap
  </code></pre>
  
  <p>to mimic wrapToPi but it doesn't seem to work. On Matlab page, it says that </p>
  
  <blockquote>
    <p>lambdaWrapped = wrapToPi(lambda) wraps angles in lambda, in radians,
    to the interval [−pi pi]. pi maps to pi and −pi maps to −pi. (In
    general, odd, positive multiples of pi map to pi and odd, negative
    multiples of pi map to −pi.)</p>
  </blockquote>
  
  <p>How is wrapToPi different from np.unwrap?</p>