summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Zindy <ezindy@gmail.com>2013-03-16 12:31:39 +0000
committerEgor Zindy <ezindy@gmail.com>2013-03-16 12:31:39 +0000
commit91f083a694e9c9185b6a2e10275a0616d18064a6 (patch)
treeed7263cf41ff635ecf934c66677175b6cfe75076
parentbd7104cef45be9a4250cb67af9225c9606498a51 (diff)
downloadnumpy-91f083a694e9c9185b6a2e10275a0616d18064a6.tar.gz
fixed the testResize1 test in testArray.py -- Changed order of the resize arguments in Array2.h and replaced len(XXXnumpyarray) with XXXnumpyarray.size
-rw-r--r--doc/swig/test/Array2.h2
-rwxr-xr-xdoc/swig/test/testArray.py12
2 files changed, 7 insertions, 7 deletions
diff --git a/doc/swig/test/Array2.h b/doc/swig/test/Array2.h
index a6e5bfc30..7f8d4ca65 100644
--- a/doc/swig/test/Array2.h
+++ b/doc/swig/test/Array2.h
@@ -32,7 +32,7 @@ public:
int ncols() const;
// Resize array
- void resize(int ncols, int nrows, long* data=0);
+ void resize(int nrows, int ncols, long* data=0);
// Set item accessor
Array1 & operator[](int i);
diff --git a/doc/swig/test/testArray.py b/doc/swig/test/testArray.py
index b25aff85a..65e69e191 100755
--- a/doc/swig/test/testArray.py
+++ b/doc/swig/test/testArray.py
@@ -69,7 +69,7 @@ class Array1TestCase(unittest.TestCase):
"Test Array1 resize method, array"
a = np.zeros((2*self.length,), dtype='l')
self.array1.resize(a)
- self.failUnless(len(self.array1) == len(a))
+ self.failUnless(len(self.array1) == a.size)
def testResizeBad(self):
"Test Array1 resize method, negative length"
@@ -177,11 +177,11 @@ class Array2TestCase(unittest.TestCase):
self.array2.resize(newRows, newCols)
self.failUnless(len(self.array2) == newRows * newCols)
- #def testResize1(self):
- # "Test Array2 resize method, array"
- # a = np.zeros((2*self.nrows, 2*self.ncols), dtype='l')
- # self.array2.resize(a)
- # self.failUnless(len(self.array2) == len(a))
+ def testResize1(self):
+ "Test Array2 resize method, array"
+ a = np.zeros((2*self.nrows, 2*self.ncols), dtype='l')
+ self.array2.resize(a)
+ self.failUnless(len(self.array2) == a.size)
def testResizeBad1(self):
"Test Array2 resize method, negative nrows"