diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-04-26 14:47:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-26 14:47:48 -0700 |
commit | bf1e9b747db5b0ccee6fe58c92a4d0adee2c2063 (patch) | |
tree | 5ed749e1cdcada34dde094dfb271660908e52814 /numpy/lib/npyio.py | |
parent | 5d248def4ebb0cbb96c4aebe0e2f17b9914119b1 (diff) | |
parent | 59a521ee07693cc5c58d68987691df4bcc9e48ff (diff) | |
download | numpy-bf1e9b747db5b0ccee6fe58c92a4d0adee2c2063.tar.gz |
Merge pull request #13409 from seberg/fix-unicode-fmt-savetxt
BUG: (py2 only) fix unicode support for savetxt fmt string
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 ed2e26aac..0a284d78f 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -1399,7 +1399,7 @@ def savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', if len(fmt) != ncol: raise AttributeError('fmt has wrong shape. %s' % str(fmt)) format = asstr(delimiter).join(map(asstr, fmt)) - elif isinstance(fmt, str): + elif isinstance(fmt, basestring): n_fmt_chars = fmt.count('%') error = ValueError('fmt has wrong number of %% formats: %s' % fmt) if n_fmt_chars == 1: |