diff options
author | pierregm <pierregmcode@gmail.com> | 2010-11-13 19:45:37 +0100 |
---|---|---|
committer | pierregm <pierregmcode@gmail.com> | 2010-11-13 21:19:51 +0100 |
commit | de4de92be21e4dda3665648ad5102b3729d4e0b0 (patch) | |
tree | 574b81210ef3916b9a4ebf335e6e9b15dfde0fea /numpy/lib/npyio.py | |
parent | fad376ead11b8e0f3101d37b62b0c8d5ba40af72 (diff) | |
download | numpy-de4de92be21e4dda3665648ad5102b3729d4e0b0.tar.gz |
genfromtxt: Taking more adequate testing values when updating converters: bug #1665
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 8221f5c09..016a9d48f 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -1399,7 +1399,13 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None, except ValueError: # Unused converter specified continue + # Find the value to test: + if len(first_line): + testing_value = first_values[i] + else: + testing_value = None converters[i].update(conv, locked=True, + testing_value=testing_value, default=filling_values[i], missing_values=missing_values[i],) uc_update.append((i, conv)) |