summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/_datasource.py4
-rw-r--r--numpy/lib/npyio.py6
-rw-r--r--numpy/lib/polynomial.py4
3 files changed, 7 insertions, 7 deletions
diff --git a/numpy/lib/_datasource.py b/numpy/lib/_datasource.py
index ce6d2391b..390c56d36 100644
--- a/numpy/lib/_datasource.py
+++ b/numpy/lib/_datasource.py
@@ -633,7 +633,7 @@ class Repository (DataSource):
"""
if self._isurl(self._baseurl):
- raise NotImplementedError, \
- "Directory listing of URLs, not supported yet."
+ raise NotImplementedError(
+ "Directory listing of URLs, not supported yet.")
else:
return os.listdir(self._baseurl)
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index c657f7f41..f8c24b1a0 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -113,7 +113,7 @@ class BagObj(object):
try:
return object.__getattribute__(self, '_obj')[key]
except KeyError:
- raise AttributeError, key
+ raise AttributeError(key)
def zipfile_factory(*args, **kwargs):
import zipfile
@@ -353,8 +353,8 @@ def load(file, mmap_mode=None):
try:
return _cload(fid)
except:
- raise IOError, \
- "Failed to interpret file %s as a pickle" % repr(file)
+ raise IOError(
+ "Failed to interpret file %s as a pickle" % repr(file))
finally:
if own_fid:
fid.close()
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index 47078ae88..229fe020d 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -306,8 +306,8 @@ def polyint(p, m=1, k=None):
if len(k) == 1 and m > 1:
k = k[0]*NX.ones(m, float)
if len(k) < m:
- raise ValueError, \
- "k must be a scalar or a rank-1 array of length 1 or >m."
+ raise ValueError(
+ "k must be a scalar or a rank-1 array of length 1 or >m.")
truepoly = isinstance(p, poly1d)
p = NX.asarray(p)