diff options
| author | czgdp1807 <gdp.1807@gmail.com> | 2021-09-03 12:17:26 +0530 |
|---|---|---|
| committer | czgdp1807 <gdp.1807@gmail.com> | 2021-09-03 12:17:26 +0530 |
| commit | 781d0a7ac61ce007e65abcd4e30f2181e729ae61 (patch) | |
| tree | f45f38a246bcefbca9ca8a08bd8ba55cbc6cdb15 /numpy/lib/function_base.py | |
| parent | b341e4c3249817d2e14ddf71aa850a8a896b9303 (diff) | |
| parent | 2ae1e068710174dc57b5ba5ad688517608efcf26 (diff) | |
| download | numpy-781d0a7ac61ce007e65abcd4e30f2181e729ae61.tar.gz | |
resolved conflicts
Diffstat (limited to 'numpy/lib/function_base.py')
| -rw-r--r-- | numpy/lib/function_base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index b43a1d666..d875a00ae 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1512,7 +1512,7 @@ def unwrap(p, discont=None, axis=-1, *, period=2*pi): difference from their predecessor of more than ``max(discont, period/2)`` to their `period`-complementary values. - For the default case where `period` is :math:`2\pi` and is `discont` is + For the default case where `period` is :math:`2\pi` and `discont` is :math:`\pi`, this unwraps a radian phase `p` such that adjacent differences are never greater than :math:`\pi` by adding :math:`2k\pi` for some integer :math:`k`. @@ -1866,6 +1866,8 @@ def _parse_gufunc_signature(signature): Tuple of input and output core dimensions parsed from the signature, each of the form List[Tuple[str, ...]]. """ + signature = re.sub(r'\s+', '', signature) + if not re.match(_SIGNATURE, signature): raise ValueError( 'not a valid gufunc signature: {}'.format(signature)) |
