summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polynomial.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-08-18 11:51:25 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-08-18 11:51:25 -0600
commitfbd6510d58a47ea0d166c48a82793f05425406e4 (patch)
tree330ce703eb02d20f96099c3fe0fc36ae33d4905b /numpy/polynomial/polynomial.py
parent8ddb0ce0acafe75d78df528b4d2540dfbf4b364d (diff)
downloadnumpy-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/polynomial/polynomial.py')
-rw-r--r--numpy/polynomial/polynomial.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py
index 0b044e8e8..9acdcbe52 100644
--- a/numpy/polynomial/polynomial.py
+++ b/numpy/polynomial/polynomial.py
@@ -58,8 +58,8 @@ from __future__ import division, absolute_import, print_function
__all__ = ['polyzero', 'polyone', 'polyx', 'polydomain', 'polyline',
'polyadd', 'polysub', 'polymulx', 'polymul', 'polydiv', 'polypow',
'polyval', 'polyder', 'polyint', 'polyfromroots', 'polyvander',
- 'polyfit', 'polytrim', 'polyroots', 'Polynomial','polyval2d',
- 'polyval3d', 'polygrid2d', 'polygrid3d', 'polyvander2d','polyvander3d']
+ 'polyfit', 'polytrim', 'polyroots', 'Polynomial', 'polyval2d',
+ 'polyval3d', 'polygrid2d', 'polygrid3d', 'polyvander2d', 'polyvander3d']
import numpy as np
import numpy.linalg as la
@@ -75,7 +75,7 @@ polytrim = pu.trimcoef
#
# Polynomial default domain.
-polydomain = np.array([-1,1])
+polydomain = np.array([-1, 1])
# Polynomial coefficients representing zero.
polyzero = np.array([0])
@@ -84,7 +84,7 @@ polyzero = np.array([0])
polyone = np.array([1])
# Polynomial coefficients representing the identity x.
-polyx = np.array([0,1])
+polyx = np.array([0, 1])
#
# Polynomial series functions
@@ -120,7 +120,7 @@ def polyline(off, scl) :
"""
if scl != 0 :
- return np.array([off,scl])
+ return np.array([off, scl])
else :
return np.array([off])
@@ -1119,7 +1119,7 @@ def polyvander2d(x, y, deg) :
vx = polyvander(x, degx)
vy = polyvander(y, degy)
- v = vx[..., None]*vy[..., None, :]
+ v = vx[..., None]*vy[..., None,:]
# einsum bug
#v = np.einsum("...i,...j->...ij", vx, vy)
return v.reshape(v.shape[:-2] + (-1,))
@@ -1186,7 +1186,7 @@ def polyvander3d(x, y, z, deg) :
vx = polyvander(x, degx)
vy = polyvander(y, degy)
vz = polyvander(z, degz)
- v = vx[..., None, None]*vy[..., None, :, None]*vz[..., None, None, :]
+ v = vx[..., None, None]*vy[..., None,:, None]*vz[..., None, None,:]
# einsum bug
#v = np.einsum("...i, ...j, ...k->...ijk", vx, vy, vz)
return v.reshape(v.shape[:-3] + (-1,))
@@ -1424,7 +1424,7 @@ def polycompanion(c):
mat = np.zeros((n, n), dtype=c.dtype)
bot = mat.reshape(-1)[n::n+1]
bot[...] = 1
- mat[:,-1] -= c[:-1]/c[-1]
+ mat[:, -1] -= c[:-1]/c[-1]
return mat