summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorChristoph Gohlke <cgohlke@uci.edu>2011-04-02 12:39:29 -0600
committerCharles Harris <charlesr.harris@gmail.com>2011-04-02 13:10:37 -0600
commit5d5266cbf90c352251ccf5d72a2a2eba7fe235b5 (patch)
treee96ee312774e57dcb3ba18d26a557a14348582cf /numpy/lib/npyio.py
parente05da9e451c0dcbc892423601edd7c354117456e (diff)
downloadnumpy-5d5266cbf90c352251ccf5d72a2a2eba7fe235b5.tar.gz
BUG: ticket #1565, fix conversion of int64 and uint64 types by loadtxt.
Add some tests for these types.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index e73d6fa39..9e23ba3fe 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -565,6 +565,10 @@ def _getconv(dtype):
typ = dtype.type
if issubclass(typ, np.bool_):
return lambda x: bool(int(x))
+ if issubclass(typ, np.uint64):
+ return np.uint64
+ if issubclass(typ, np.int64):
+ return np.int64
if issubclass(typ, np.integer):
return lambda x: int(float(x))
elif issubclass(typ, np.floating):