diff options
author | gfyoung <gfyoung17@gmail.com> | 2015-12-19 16:49:35 -0800 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2015-12-19 16:50:09 -0800 |
commit | 8bc592fabf4a2b0bc76db996b1523330ba095be3 (patch) | |
tree | c8a1a549e5a093a9433fe9a50a6e0e8bb5358ab1 /numpy/core/numeric.py | |
parent | e2bdaccba1a8691f9223b059b981b2890bb13b09 (diff) | |
download | numpy-8bc592fabf4a2b0bc76db996b1523330ba095be3.tar.gz |
DOC: Use print only as function when print_function is imported from __future__
Closes gh-6863.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 3b442ea78..4f3d418e6 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1808,7 +1808,7 @@ def set_string_function(f, repr=True): >>> a = np.arange(10) >>> a HA! - What are you going to do now? - >>> print a + >>> print(a) [0 1 2 3 4 5 6 7 8 9] We can reset the function to the default: @@ -2710,7 +2710,7 @@ def seterrcall(func): Callback upon error: >>> def err_handler(type, flag): - ... print "Floating point error (%s), with flag %s" % (type, flag) + ... print("Floating point error (%s), with flag %s" % (type, flag)) ... >>> saved_handler = np.seterrcall(err_handler) @@ -2729,7 +2729,7 @@ def seterrcall(func): >>> class Log(object): ... def write(self, msg): - ... print "LOG: %s" % msg + ... print("LOG: %s" % msg) ... >>> log = Log() @@ -2787,7 +2787,7 @@ def geterrcall(): >>> oldsettings = np.seterr(all='call') >>> def err_handler(type, flag): - ... print "Floating point error (%s), with flag %s" % (type, flag) + ... print("Floating point error (%s), with flag %s" % (type, flag)) >>> oldhandler = np.seterrcall(err_handler) >>> np.array([1, 2, 3]) / 0.0 Floating point error (divide by zero), with flag 1 |