cupy.unwrap#
- cupy.unwrap(p, discont=None, axis=- 1, *, period=6.283185307179586)[source]#
Unwrap by taking the complement of large deltas w.r.t. the period.
This unwraps a signal p by changing elements which have an absolute difference from their predecessor of more than
max(discont, period/2)
to their period-complementary values.For the default case where period is \(2\pi\) and is
discont
is \(\pi\), this unwraps a radian phase p such that adjacent differences are never greater than \(\pi\) by adding \(2k\pi\) for some integer \(k\).- Parameters
p (cupy.ndarray) – Input array. discont (float): Maximum discontinuity between values, default is
period/2
. Values belowperiod/2
are treated as if they wereperiod/2
. To have an effect different from the default,discont
should be larger thanperiod/2
.axis (int) – Axis along which unwrap will operate, default is the last axis.
period – float, optional Size of the range over which the input wraps. By default, it is \(2\pi\).
- Returns
The result array.
- Return type
See also