diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-28 17:23:13 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-03-01 08:35:12 -0700 |
commit | 3655b732bd08022dab8498b44191d6c4049bc7a8 (patch) | |
tree | a2a2210d560d5696e47a5dcf5d969faa8d21ad79 /doc/numpybook/comparison | |
parent | d1e692d70da7532b02d752d0842987333bd76c70 (diff) | |
download | numpy-3655b732bd08022dab8498b44191d6c4049bc7a8.tar.gz |
2to3: Apply `raise` fixes. Closes #3077.
Replaces the
raise Exception, msg:
form with
raise Exception(msg):
Diffstat (limited to 'doc/numpybook/comparison')
-rw-r--r-- | doc/numpybook/comparison/weave/filter.py | 2 | ||||
-rw-r--r-- | doc/numpybook/comparison/weave/inline.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/numpybook/comparison/weave/filter.py b/doc/numpybook/comparison/weave/filter.py index 6fc16c79f..41992708d 100644 --- a/doc/numpybook/comparison/weave/filter.py +++ b/doc/numpybook/comparison/weave/filter.py @@ -2,7 +2,7 @@ from scipy import weave, zeros_like def filter(a): if a.ndim != 2: - raise ValueError, "a must be 2-d" + raise ValueError("a must be 2-d") code = r""" int i,j; for(i=1;i<Na[0]-1;i++) { diff --git a/doc/numpybook/comparison/weave/inline.py b/doc/numpybook/comparison/weave/inline.py index bfac588aa..0bf62ffe8 100644 --- a/doc/numpybook/comparison/weave/inline.py +++ b/doc/numpybook/comparison/weave/inline.py @@ -3,7 +3,7 @@ from numpy import rand, zeros_like def example1(a): if not isinstance(a, list): - raise ValueError, "argument must be a list" + raise ValueError("argument must be a list") code = r""" int i; py::tuple results(2); @@ -18,7 +18,7 @@ def example1(a): def arr(a): if a.ndim != 2: - raise ValueError, "a must be 2-d" + raise ValueError("a must be 2-d") code = r""" int i,j; for(i=1;i<Na[0]-1;i++) { |