diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 16:10:44 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 17:38:00 -0600 |
commit | b2793ea74ea05bc64288287dd2efbe0dcae99534 (patch) | |
tree | 565008825238b770fb5ab320e857dbe7a8f4c9b2 /numpy/linalg/linalg.py | |
parent | e1a9692cc36e4353798a332c834fce7aa6cf9b54 (diff) | |
download | numpy-b2793ea74ea05bc64288287dd2efbe0dcae99534.tar.gz |
STY: Fix up some two line old-style exceptions.
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r-- | numpy/linalg/linalg.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 1aaefd089..44396f075 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -151,8 +151,8 @@ def _fastCopyAndTranspose(type, *arrays): def _assertRank2(*arrays): for a in arrays: if len(a.shape) != 2: - raise LinAlgError, '%d-dimensional array given. Array must be \ - two-dimensional' % len(a.shape) + raise LinAlgError('%d-dimensional array given. Array must be ' + 'two-dimensional' % len(a.shape)) def _assertSquareness(*arrays): for a in arrays: @@ -527,8 +527,8 @@ def cholesky(a): lapack_routine = lapack_lite.dpotrf results = lapack_routine(_L, n, a, m, 0) if results['info'] > 0: - raise LinAlgError, 'Matrix is not positive definite - \ - Cholesky decomposition cannot be computed' + raise LinAlgError('Matrix is not positive definite - ' + 'Cholesky decomposition cannot be computed') s = triu(a, k=0).transpose() if (s.dtype != result_t): s = s.astype(result_t) |