diff options
author | Julian Taylor <juliantaylor108@gmail.com> | 2014-03-19 18:57:17 +0100 |
---|---|---|
committer | Julian Taylor <juliantaylor108@gmail.com> | 2014-03-19 18:57:17 +0100 |
commit | e67765b235f7539adcde0ea047726ee35dae9cdf (patch) | |
tree | b64f1e00b41215f6c05e220cbb2c616c78aebcfd /numpy/lib/tests/test_utils.py | |
parent | 7e40517d04a4743f37aa9f6dfb2aeb2343f5443a (diff) | |
parent | caf3fc4d37d56b4d7e80ce6e7d564cef698171b9 (diff) | |
download | numpy-e67765b235f7539adcde0ea047726ee35dae9cdf.tar.gz |
Merge pull request #4515 from ogrisel/undefined-asarray
FIX: missing asarray import in numpy.libs.utils
Diffstat (limited to 'numpy/lib/tests/test_utils.py')
-rw-r--r-- | numpy/lib/tests/test_utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_utils.py b/numpy/lib/tests/test_utils.py index 93c674766..36d5d6428 100644 --- a/numpy/lib/tests/test_utils.py +++ b/numpy/lib/tests/test_utils.py @@ -1,6 +1,7 @@ from __future__ import division, absolute_import, print_function import sys +from numpy.core import arange from numpy.testing import * import numpy.lib.utils as utils from numpy.lib import deprecate @@ -46,9 +47,17 @@ def test_deprecate_fn(): assert_('old_func3' in new_func3.__doc__) assert_('new_func3' in new_func3.__doc__) + def test_safe_eval_nameconstant(): # Test if safe_eval supports Python 3.4 _ast.NameConstant utils.safe_eval('None') + +def test_byte_bounds(): + a = arange(12).reshape(3, 4) + low, high = utils.byte_bounds(a) + assert_equal(high - low, a.size * a.itemsize) + + if __name__ == "__main__": run_module_suite() |