summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorczgdp1807 <gdp.1807@gmail.com>2021-09-03 12:17:26 +0530
committerczgdp1807 <gdp.1807@gmail.com>2021-09-03 12:17:26 +0530
commit781d0a7ac61ce007e65abcd4e30f2181e729ae61 (patch)
treef45f38a246bcefbca9ca8a08bd8ba55cbc6cdb15 /numpy/lib/function_base.py
parentb341e4c3249817d2e14ddf71aa850a8a896b9303 (diff)
parent2ae1e068710174dc57b5ba5ad688517608efcf26 (diff)
downloadnumpy-781d0a7ac61ce007e65abcd4e30f2181e729ae61.tar.gz
resolved conflicts
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py4
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))