diff options
author | Warren Weckesser <warren.weckesser@gmail.com> | 2013-10-20 10:56:27 -0400 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2013-10-20 10:56:27 -0400 |
commit | 0d284764a855cae11699228ff1b81e6d18f38ed2 (patch) | |
tree | 8985294e0e6ac7d93a1167e7367702f88f2cf21e /numpy/lib/npyio.py | |
parent | 55d3ef5b81b709cc9d8ad6b13f75ca0f05f65276 (diff) | |
download | numpy-0d284764a855cae11699228ff1b81e6d18f38ed2.tar.gz |
MAINT: io: handle a bad fmt argument in savetxt by raising a ValueError.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 9e6989c77..dced7fd78 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -1047,6 +1047,8 @@ def savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', raise error else: format = fmt + else: + raise ValueError('invalid fmt: %r' % (fmt,)) if len(header) > 0: header = header.replace('\n', '\n' + comments) |