Skip to content

Instantly share code, notes, and snippets.

@smarnach
Created April 12, 2012 22:18
Show Gist options
  • Save smarnach/2371412 to your computer and use it in GitHub Desktop.
Save smarnach/2371412 to your computer and use it in GitHub Desktop.
In [1]: import numpy
In [2]: a = numpy.array([0.5, 1.3, 2.4, 10.3, 10.8, 10.2, 7.6, 3.2, 2.9])
In [3]: numpy.unwrap(2.0 * a) / 2.0
Out[3]:
array([ 0.5 , 1.3 , 2.4 , 0.87522204, 1.37522204,
0.77522204, 1.31681469, 0.05840735, -0.24159265])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment