summaryrefslogtreecommitdiff
path: root/numpy/linalg/linalg.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-07-11 16:49:04 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-07-11 16:49:04 -0600
commit2f1174dee44e901b7d028beb86f4a8ea324bd74f (patch)
tree8f09dc2bd35e2631f5821fe2e998f6ea46e254b8 /numpy/linalg/linalg.py
parent49a587cd786242b05fcfd22d5cda961d733b68d4 (diff)
downloadnumpy-2f1174dee44e901b7d028beb86f4a8ea324bd74f.tar.gz
MAINT: Use np.errstate context manager.
Now that Python < 2.6 is no longer supported we can use the errstate context manager in places where constructs like ``` old = seterr(invalid='ignore') try: blah finally: seterr(**old) ``` were used.
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r--numpy/linalg/linalg.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py
index 279ce21f9..4c4e51748 100644
--- a/numpy/linalg/linalg.py
+++ b/numpy/linalg/linalg.py
@@ -18,11 +18,12 @@ __all__ = ['matrix_power', 'solve', 'tensorsolve', 'tensorinv', 'inv',
import warnings
-from numpy.core import array, asarray, zeros, empty, transpose, \
- intc, single, double, csingle, cdouble, inexact, complexfloating, \
- newaxis, ravel, all, Inf, dot, add, multiply, sqrt, maximum, \
- fastCopyAndTranspose, sum, isfinite, size, finfo, errstate, \
- geterrobj, longdouble, rollaxis, amin, amax
+from numpy.core import (
+ array, asarray, zeros, empty, transpose, intc, single, double, csingle,
+ cdouble, inexact, complexfloating, newaxis, ravel, all, Inf, dot, add,
+ multiply, sqrt, maximum, fastCopyAndTranspose, sum, isfinite, size,
+ finfo, errstate, geterrobj, longdouble, rollaxis, amin, amax
+ )
from numpy.lib import triu, asfarray
from numpy.linalg import lapack_lite, _umath_linalg
from numpy.matrixlib.defmatrix import matrix_power