On this page
numpy.unwrap
- numpy.unwrap(p, discont=3.141592653589793, axis=-1)[source]
- 
    Unwrap by changing deltas between values to 2*pi complement. Unwrap radian phase pby changing absolute jumps greater thandiscontto their 2*pi complement along the given axis.- Parameters
- 
      - parray_like
- 
        Input array. 
- discontfloat, optional
- 
        Maximum discontinuity between values, default is pi.
- axisint, optional
- 
        Axis along which unwrap will operate, default is the last axis. 
 
- Returns
- 
      - outndarray
- 
        Output array. 
 
 NotesIf the discontinuity in pis smaller thanpi, but larger thandiscont, no unwrapping is done because taking the 2*pi complement would only make the discontinuity larger.Examples>>> phase = np.linspace(0, np.pi, num=5) >>> phase[3:] += np.pi >>> phase array([ 0. , 0.78539816, 1.57079633, 5.49778714, 6.28318531]) # may vary >>> np.unwrap(phase) array([ 0. , 0.78539816, 1.57079633, -0.78539816, 0. ]) # may vary
© 2005–2020 NumPy Developers
Licensed under the 3-clause BSD License.
 https://numpy.org/doc/1.19/reference/generated/numpy.unwrap.html