summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorBharat123rox <bharatraghunthan9767@gmail.com>2019-05-12 22:10:24 +0530
committerBharat123rox <bharatraghunthan9767@gmail.com>2019-05-12 22:10:24 +0530
commitaa04be9e443e7c087c10989559af24e5ab6459f0 (patch)
tree8fa2a6b2b2b127a99c4aac5e94fb19be0d74642f /numpy/lib/npyio.py
parent4ebd08df74769ad0628a05e1d0654244008ab10b (diff)
parentd2d589703d5ee743251fbc6ea045f28e1c5e9e71 (diff)
downloadnumpy-aa04be9e443e7c087c10989559af24e5ab6459f0.tar.gz
Merge upstream branch 'master' of https://github.com/numpy/numpy into fix-genfromtxt
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index 24c857a75..504a71fe7 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:
@@ -1549,7 +1549,8 @@ def fromregex(file, regexp, dtype, encoding=None):
def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
skip_header=0, skip_footer=0, converters=None,
missing_values=None, filling_values=None, usecols=None,
- names=None, excludelist=None, deletechars=None,
+ names=None, excludelist=None,
+ deletechars=''.join(sorted(NameValidator.defaultdeletechars)),
replace_space='_', autostrip=False, case_sensitive=True,
defaultfmt="f%i", unpack=None, usemask=False, loose=True,
invalid_raise=True, max_rows=None, encoding='bytes'):