diff options
| author | danielhrisca <daniel.hrisca@gmail.com> | 2018-12-24 07:36:23 +0200 |
|---|---|---|
| committer | danielhrisca <daniel.hrisca@gmail.com> | 2018-12-24 07:36:23 +0200 |
| commit | 148a07b5023bff303d0d07a2d7896c928642d9d4 (patch) | |
| tree | 560aaf27742fd4c0bc1d71b3fad2a7d62c5e48a7 | |
| parent | 41de695d6482f35c9fe4a05f1dde8b817adcee1a (diff) | |
| download | numpy-148a07b5023bff303d0d07a2d7896c928642d9d4.tar.gz | |
chage ValueError to TypeError after review
| -rw-r--r-- | numpy/core/records.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index 507258c15..d128f41e1 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -720,7 +720,7 @@ def fromstring(datastring, dtype=None, shape=None, offset=0, formats=None, a string""" if dtype is None and formats is None: - raise ValueError("Must have dtype= or formats=") + raise TypeError("fromstring() needs a 'dtype' or 'formats' argument") if dtype is not None: descr = sb.dtype(dtype) @@ -769,7 +769,7 @@ def fromfile(fd, dtype=None, shape=None, offset=0, formats=None, """ if dtype is None and formats is None: - raise ValueError("Must have dtype= or formats=") + raise TypeError("fromfile() needs a 'dtype' or 'formats' argument") if (shape is None or shape == 0): shape = (-1,) |
