summaryrefslogtreecommitdiff
path: root/numpy/numarray/util.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-04-06 13:25:26 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-04-06 13:25:26 -0600
commitbb726ca19f434f5055c0efceefe48d89469fcbbe (patch)
tree889782afaf67fd5acb5f222969251871c0c46e5a /numpy/numarray/util.py
parent7441fa50523f5b4a16c854bf004d675e5bd86ab8 (diff)
downloadnumpy-bb726ca19f434f5055c0efceefe48d89469fcbbe.tar.gz
2to3: Apply `print` fixer.
Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
Diffstat (limited to 'numpy/numarray/util.py')
-rw-r--r--numpy/numarray/util.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/numarray/util.py b/numpy/numarray/util.py
index acdb18fc8..b8e37a28d 100644
--- a/numpy/numarray/util.py
+++ b/numpy/numarray/util.py
@@ -1,4 +1,4 @@
-from __future__ import division, absolute_import
+from __future__ import division, absolute_import, print_function
import os
import numpy as np
@@ -23,22 +23,22 @@ def handleError(errorStatus, sourcemsg):
modes = np.geterr()
if errorStatus & np.FPE_INVALID:
if modes['invalid'] == "warn":
- print "Warning: Encountered invalid numeric result(s)", sourcemsg
+ print("Warning: Encountered invalid numeric result(s)", sourcemsg)
if modes['invalid'] == "raise":
raise MathDomainError(sourcemsg)
if errorStatus & np.FPE_DIVIDEBYZERO:
if modes['dividebyzero'] == "warn":
- print "Warning: Encountered divide by zero(s)", sourcemsg
+ print("Warning: Encountered divide by zero(s)", sourcemsg)
if modes['dividebyzero'] == "raise":
raise ZeroDivisionError(sourcemsg)
if errorStatus & np.FPE_OVERFLOW:
if modes['overflow'] == "warn":
- print "Warning: Encountered overflow(s)", sourcemsg
+ print("Warning: Encountered overflow(s)", sourcemsg)
if modes['overflow'] == "raise":
raise NumOverflowError(sourcemsg)
if errorStatus & np.FPE_UNDERFLOW:
if modes['underflow'] == "warn":
- print "Warning: Encountered underflow(s)", sourcemsg
+ print("Warning: Encountered underflow(s)", sourcemsg)
if modes['underflow'] == "raise":
raise UnderflowError(sourcemsg)