summaryrefslogtreecommitdiff
path: root/numpy/lib/io.py
diff options
context:
space:
mode:
authordhuard <dhuard@localhost>2008-04-03 14:17:08 +0000
committerdhuard <dhuard@localhost>2008-04-03 14:17:08 +0000
commit1b8a670793e06d3450bacc499fad5f074a95c8e7 (patch)
treeb9b8b1047475fec1956c6e8353728f0ca1500b9f /numpy/lib/io.py
parent8784a1abd5c74dbd134a04a4bcd0f050fe650ed6 (diff)
downloadnumpy-1b8a670793e06d3450bacc499fad5f074a95c8e7.tar.gz
added 1D tests for loadtxt and savetxt. Fixed a bug
Diffstat (limited to 'numpy/lib/io.py')
-rw-r--r--numpy/lib/io.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/io.py b/numpy/lib/io.py
index 7be3c9804..7ef7df933 100644
--- a/numpy/lib/io.py
+++ b/numpy/lib/io.py
@@ -353,7 +353,7 @@ def savetxt(fname, X, fmt='%.18e',delimiter=' '):
X = np.asarray(X)
origShape = None
- if len(X.shape)==1 and not hasattr(X.dtype, 'names'):
+ if len(X.shape)==1 and X.dtype.names is None:
origShape = X.shape
X.shape = len(X), 1
for row in X: