diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2016-12-19 14:25:51 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2016-12-19 14:32:56 +0000 |
commit | 08aa95f17472496c57b3945f60c17c15c6efcd10 (patch) | |
tree | cc4496c7c4543262f05fc88956501314c8f52353 | |
parent | b28ea1c57c9dba8feec7f616986f2e3e28dd6192 (diff) | |
download | numpy-08aa95f17472496c57b3945f60c17c15c6efcd10.tar.gz |
BUG: prevent np.linalg.eigh ValueError when given a 0x0 array
Throw LinAlgError instead with an appropriate message
-rw-r--r-- | numpy/linalg/linalg.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 60a69b9c8..7b4bbf416 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -1279,6 +1279,7 @@ def eigh(a, UPLO='L'): a, wrap = _makearray(a) _assertRankAtLeast2(a) _assertNdSquareness(a) + _assertNoEmpty2d(a) t, result_t = _commonType(a) extobj = get_linalg_error_extobj( |