|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72688 - sandbox/numpy/libs/python/numpy/test
From: seefeld_at_[hidden]
Date: 2011-06-19 16:16:07
Author: stefan
Date: 2011-06-19 16:16:06 EDT (Sun, 19 Jun 2011)
New Revision: 72688
URL: http://svn.boost.org/trac/boost/changeset/72688
Log:
Fix ndarray tests.
Text files modified:
sandbox/numpy/libs/python/numpy/test/ndarray.py | 2 +-
sandbox/numpy/libs/python/numpy/test/ndarray_mod.cpp | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
Modified: sandbox/numpy/libs/python/numpy/test/ndarray.py
==============================================================================
--- sandbox/numpy/libs/python/numpy/test/ndarray.py (original)
+++ sandbox/numpy/libs/python/numpy/test/ndarray.py 2011-06-19 16:16:06 EDT (Sun, 19 Jun 2011)
@@ -38,7 +38,7 @@
self.assertEqual(shape,a1.shape)
#self.assert_(type(a1),dtp)
self.assertEqual(shape,a2.shape)
- #self.assert_(dtp,type(a2))
+ #self.assert_(dt,type(a2))
if __name__=="__main__":
unittest.main()
Modified: sandbox/numpy/libs/python/numpy/test/ndarray_mod.cpp
==============================================================================
--- sandbox/numpy/libs/python/numpy/test/ndarray_mod.cpp (original)
+++ sandbox/numpy/libs/python/numpy/test/ndarray_mod.cpp 2011-06-19 16:16:06 EDT (Sun, 19 Jun 2011)
@@ -25,7 +25,9 @@
Py_intptr_t *c_shape = new Py_intptr_t[len];
for (unsigned i = 0; i != len; ++i)
c_shape[i] = bp::extract<Py_intptr_t>(shape[i]);
- return bp::numpy::empty(len, c_shape, dt);
+ bp::numpy::ndarray result = bp::numpy::empty(len, c_shape, dt);
+ delete [] c_shape;
+ return result;
}
BOOST_PYTHON_MODULE(ndarray_mod) {
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk