summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-06 02:12:50 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-06 02:12:50 +0000
commitc8b5a7e9e0d39c225ac3e590d83ebf869d9c1235 (patch)
tree01c150ee7014c8970c2a7f103be13666595a5ec6 /numpy/testing/utils.py
parent9dd16b4b933636baeb28076d73f4bdd7ab006527 (diff)
downloadnumpy-c8b5a7e9e0d39c225ac3e590d83ebf869d9c1235.tar.gz
Fixed error in setflags and added a few unit tests for test_multiarray
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index a7d303973..19acd2654 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -9,7 +9,8 @@ import math
__all__ = ['assert_equal', 'assert_almost_equal','assert_approx_equal',
'assert_array_equal', 'assert_array_less',
- 'assert_array_almost_equal', 'jiffies', 'memusage', 'rand']
+ 'assert_array_almost_equal', 'jiffies', 'memusage', 'rand',
+ 'runstring']
def rand(*args):
"""Returns an array of random numbers with the given shape.
@@ -208,3 +209,7 @@ def assert_array_less(x,y,err_msg=''):
except ValueError:
print shape(x),shape(y)
raise ValueError, 'arrays are not less-ordered'
+
+def runstring(astr, dict):
+ exec astr in dict
+