diff options
author | dhuard <dhuard@localhost> | 2008-04-04 20:13:24 +0000 |
---|---|---|
committer | dhuard <dhuard@localhost> | 2008-04-04 20:13:24 +0000 |
commit | f2e6d8e233d380133d8e3504272b3ed0554bfaa4 (patch) | |
tree | a072490fe4fd2d36d27ade3fbe41ebaa40cd9fa2 /numpy/lib/io.py | |
parent | 343841340122a5c5bd2071584e81ad8e027e6389 (diff) | |
download | numpy-f2e6d8e233d380133d8e3504272b3ed0554bfaa4.tar.gz |
Modified io._getconv to allow loading values stored as float as integers arrays. Added test to check the behavior as suggested in the comment from b. southey in
ticket #623
Diffstat (limited to 'numpy/lib/io.py')
-rw-r--r-- | numpy/lib/io.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/io.py b/numpy/lib/io.py index bb4d254a8..235316c82 100644 --- a/numpy/lib/io.py +++ b/numpy/lib/io.py @@ -203,7 +203,7 @@ def _getconv(dtype): if issubclass(typ, np.bool_): return lambda x: bool(int(x)) if issubclass(typ, np.integer): - return int + return lambda x: int(float(x)) elif issubclass(typ, np.floating): return float elif issubclass(typ, np.complex): |