jax.numpy.unwrap
Warning
This page was created from a pull request (#9655).
jax.numpy.unwrapΒΆ
- jax.numpy.unwrap(p, discont=3.141592653589793, axis=- 1)[source]ΒΆ
Unwrap by taking the complement of large deltas with respect to the period.
LAX-backend implementation of
unwrap()
.Original docstring below.
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 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 (array_like) β Input array.
discont (float, optional) β 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, optional) β Axis along which unwrap will operate, default is the last axis.
- Returns
out β Output array.
- Return type