From bb726ca19f434f5055c0efceefe48d89469fcbbe Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sat, 6 Apr 2013 13:25:26 -0600 Subject: 2to3: Apply `print` fixer. Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078. --- numpy/lib/user_array.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'numpy/lib/user_array.py') diff --git a/numpy/lib/user_array.py b/numpy/lib/user_array.py index e6871f489..1cc1345aa 100644 --- a/numpy/lib/user_array.py +++ b/numpy/lib/user_array.py @@ -4,7 +4,7 @@ Try to inherit from the ndarray instead of using this class as this is not complete. """ -from __future__ import division, absolute_import +from __future__ import division, absolute_import, print_function from numpy.core import array, asarray, absolute, add, subtract, multiply, \ divide, remainder, power, left_shift, right_shift, bitwise_and, \ @@ -205,15 +205,15 @@ if __name__ == '__main__': ua=container(temp) # new object created begin test - print dir(ua) - print shape(ua),ua.shape # I have changed Numeric.py + print(dir(ua)) + print(shape(ua),ua.shape) # I have changed Numeric.py ua_small=ua[:3,:5] - print ua_small + print(ua_small) ua_small[0,0]=10 # this did not change ua[0,0], which is not normal behavior - print ua_small[0,0],ua[0,0] - print sin(ua_small)/3.*6.+sqrt(ua_small**2) - print less(ua_small,103),type(less(ua_small,103)) - print type(ua_small*reshape(arange(15),shape(ua_small))) - print reshape(ua_small,(5,3)) - print transpose(ua_small) + print(ua_small[0,0],ua[0,0]) + print(sin(ua_small)/3.*6.+sqrt(ua_small**2)) + print(less(ua_small,103),type(less(ua_small,103))) + print(type(ua_small*reshape(arange(15),shape(ua_small)))) + print(reshape(ua_small,(5,3))) + print(transpose(ua_small)) -- cgit v1.2.1