summaryrefslogtreecommitdiff
path: root/doc/swig/test/testFarray.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 /doc/swig/test/testFarray.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 'doc/swig/test/testFarray.py')
-rwxr-xr-xdoc/swig/test/testFarray.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/swig/test/testFarray.py b/doc/swig/test/testFarray.py
index 3905e26bd..15683b70b 100755
--- a/doc/swig/test/testFarray.py
+++ b/doc/swig/test/testFarray.py
@@ -16,7 +16,7 @@ else: BadListError = ValueError
# Add the distutils-generated build directory to the python search path and then
# import the extension module
libDir = "lib.%s-%s" % (get_platform(), sys.version[:3])
-sys.path.insert(0,os.path.join("build", libDir))
+sys.path.insert(0, os.path.join("build", libDir))
import Farray
######################################################################
@@ -36,7 +36,7 @@ class FarrayTestCase(unittest.TestCase):
"Test Farray copy constructor"
for i in range(self.nrows):
for j in range(self.ncols):
- self.array[i,j] = i + j
+ self.array[i, j] = i + j
arrayCopy = Farray.Farray(self.array)
self.failUnless(arrayCopy == self.array)
@@ -66,10 +66,10 @@ class FarrayTestCase(unittest.TestCase):
n = self.ncols
for i in range(m):
for j in range(n):
- self.array[i,j] = i*j
+ self.array[i, j] = i*j
for i in range(m):
for j in range(n):
- self.failUnless(self.array[i,j] == i*j)
+ self.failUnless(self.array[i, j] == i*j)
def testSetBad1(self):
"Test Farray __setitem__ method, negative row"
@@ -114,7 +114,7 @@ class FarrayTestCase(unittest.TestCase):
"""
for i in range(self.nrows):
for j in range(self.ncols):
- self.array[i,j] = i+j
+ self.array[i, j] = i+j
self.failUnless(self.array.asString() == result)
def testStr(self):
@@ -128,20 +128,20 @@ class FarrayTestCase(unittest.TestCase):
"""
for i in range(self.nrows):
for j in range(self.ncols):
- self.array[i,j] = i-j
+ self.array[i, j] = i-j
self.failUnless(str(self.array) == result)
def testView(self):
"Test Farray view method"
for i in range(self.nrows):
for j in range(self.ncols):
- self.array[i,j] = i+j
+ self.array[i, j] = i+j
a = self.array.view()
self.failUnless(isinstance(a, np.ndarray))
self.failUnless(a.flags.f_contiguous)
for i in range(self.nrows):
for j in range(self.ncols):
- self.failUnless(a[i,j] == i+j)
+ self.failUnless(a[i, j] == i+j)
######################################################################