summaryrefslogtreecommitdiff
path: root/numpy/linalg/linalg.py
diff options
context:
space:
mode:
authorseberg <sebastian@sipsolutions.net>2018-06-27 19:35:36 +0200
committerGitHub <noreply@github.com>2018-06-27 19:35:36 +0200
commita32c377102193b4bd6b7921e4497e9d1c284481f (patch)
tree28bbcd51839d651b2fdba4f79a781f4a52d8f4a0 /numpy/linalg/linalg.py
parent72d2bc0b36478e06cc9d2f942f24308cabf1a22e (diff)
parentb80d360e2b82cd52ad69548cc292c2bab95de6ce (diff)
downloadnumpy-a32c377102193b4bd6b7921e4497e9d1c284481f.tar.gz
Merge pull request #11424 from eric-wieser/empty-svd
ENH: Allow use of svd on empty arrays
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r--numpy/linalg/linalg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py
index 90dc2e657..8e7ad70cd 100644
--- a/numpy/linalg/linalg.py
+++ b/numpy/linalg/linalg.py
@@ -1527,7 +1527,6 @@ def svd(a, full_matrices=True, compute_uv=True):
"""
a, wrap = _makearray(a)
- _assertNoEmpty2d(a)
_assertRankAtLeast2(a)
t, result_t = _commonType(a)
@@ -1644,6 +1643,7 @@ def cond(x, p=None):
"""
x = asarray(x) # in case we have a matrix
+ _assertNoEmpty2d(x)
if p is None or p == 2 or p == -2:
s = svd(x, compute_uv=False)
with errstate(all='ignore'):