diff options
author | Jaime <jaime.frio@gmail.com> | 2015-12-20 07:35:41 +0100 |
---|---|---|
committer | Jaime <jaime.frio@gmail.com> | 2015-12-20 07:35:41 +0100 |
commit | 144c34b8ecd051e05a93c6268290eadb1827afb0 (patch) | |
tree | c8a1a549e5a093a9433fe9a50a6e0e8bb5358ab1 /numpy/core/numeric.py | |
parent | e2bdaccba1a8691f9223b059b981b2890bb13b09 (diff) | |
parent | 8bc592fabf4a2b0bc76db996b1523330ba095be3 (diff) | |
download | numpy-144c34b8ecd051e05a93c6268290eadb1827afb0.tar.gz |
Merge pull request #6867 from gfyoung/print_fixes
DOC: No Print Statements When Using print_function from __future__
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 |