diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-02-24 16:46:58 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-02-24 16:46:58 +0000 |
commit | 48783e5ceb7f60c33db81ab72e5024f42b220990 (patch) | |
tree | 2284b780e521418b0e73fd7283403d3e7e28da50 /numpy/lib/npyio.py | |
parent | 5f5ccecbfc116284ed8c8d53cd8b203ceef5f7c7 (diff) | |
download | numpy-48783e5ceb7f60c33db81ab72e5024f42b220990.tar.gz |
MAINT: replace len(x.shape) with x.ndim
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index c575cc030..0dee6b333 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -925,7 +925,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, flat_dt, flat_packing = flatten_dtype(tp) types.extend(flat_dt) # Avoid extra nesting for subarrays - if len(tp.shape) > 0: + if tp.ndim > 0: packing.extend(flat_packing) else: packing.append((len(flat_dt), flat_packing)) |