diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-08-18 11:51:25 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-08-18 11:51:25 -0600 |
commit | fbd6510d58a47ea0d166c48a82793f05425406e4 (patch) | |
tree | 330ce703eb02d20f96099c3fe0fc36ae33d4905b /numpy/linalg/linalg.py | |
parent | 8ddb0ce0acafe75d78df528b4d2540dfbf4b364d (diff) | |
download | numpy-fbd6510d58a47ea0d166c48a82793f05425406e4.tar.gz |
STY: Giant comma spacing fixup.
Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long
and will need to be broken at some point. OTOH, some lines were already
too long and need to be broken at some point. Now seems as good a time
as any to do this with open PRs at a minimum.
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r-- | numpy/linalg/linalg.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 851db6e8c..78e487a25 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -13,7 +13,7 @@ from __future__ import division, absolute_import, print_function __all__ = ['matrix_power', 'solve', 'tensorsolve', 'tensorinv', 'inv', 'cholesky', 'eigvals', 'eigvalsh', 'pinv', 'slogdet', 'det', - 'svd', 'eig', 'eigh','lstsq', 'norm', 'qr', 'cond', 'matrix_rank', + 'svd', 'eig', 'eigh', 'lstsq', 'norm', 'qr', 'cond', 'matrix_rank', 'LinAlgError'] import warnings @@ -271,7 +271,7 @@ def tensorsolve(a, b, axes=None): True """ - a,wrap = _makearray(a) + a, wrap = _makearray(a) b = asarray(b) an = a.ndim @@ -766,7 +766,7 @@ def qr(a, mode='reduced'): # handle modes that don't return q if mode == 'r': - r = _fastCopyAndTranspose(result_t, a[:,:mn]) + r = _fastCopyAndTranspose(result_t, a[:, :mn]) return wrap(triu(r)) if mode == 'raw': @@ -808,7 +808,7 @@ def qr(a, mode='reduced'): raise LinAlgError('%s returns %d' % (routine_name, results['info'])) q = _fastCopyAndTranspose(result_t, q[:mc]) - r = _fastCopyAndTranspose(result_t, a[:,:mc]) + r = _fastCopyAndTranspose(result_t, a[:, :mc]) return wrap(q), wrap(triu(r)) @@ -1415,10 +1415,10 @@ def cond(x, p=None): """ x = asarray(x) # in case we have a matrix if p is None: - s = svd(x,compute_uv=False) + s = svd(x, compute_uv=False) return s[0]/s[-1] else: - return norm(x,p)*norm(inv(x),p) + return norm(x, p)*norm(inv(x), p) def matrix_rank(M, tol=None): @@ -1585,7 +1585,7 @@ def pinv(a, rcond=1e-15 ): s[i] = 1./s[i] else: s[i] = 0.; - res = dot(transpose(vt), multiply(s[:, newaxis],transpose(u))) + res = dot(transpose(vt), multiply(s[:, newaxis], transpose(u))) return wrap(res) # Determinant @@ -1824,7 +1824,7 @@ def lstsq(a, b, rcond=-1): result_real_t = _realType(result_t) real_t = _linalgRealType(t) bstar = zeros((ldb, n_rhs), t) - bstar[:b.shape[0],:n_rhs] = b.copy() + bstar[:b.shape[0], :n_rhs] = b.copy() a, bstar = _fastCopyAndTranspose(t, a, bstar) a, bstar = _to_native_byte_order(a, bstar) s = zeros((min(m, n),), real_t) |