summaryrefslogtreecommitdiff
path: root/numpy/testing/nose_tools/utils.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2017-04-03 14:20:36 +0200
committerCharles Harris <charlesr.harris@gmail.com>2017-11-21 10:16:00 -0700
commitd8edc62e8c9e69280fb8a171c7678b2fea929696 (patch)
treeaa6813116f4f72bf7270be2fdb1537abe8776f02 /numpy/testing/nose_tools/utils.py
parentb6044d88cab21d7ebe274bcd79bc430a57c520e6 (diff)
downloadnumpy-d8edc62e8c9e69280fb8a171c7678b2fea929696.tar.gz
ENH: Add encoding option to numpy text IO.
This modifies loadtxt and genfromtxt in several ways intended to add unicode support for text files by adding an `encoding` keyword to np.load, np.genfromtxt, np.savetxt, and np.fromregex. The original treatment of the relevant files was to open them as byte files, whereas they are now opened as text files with an encoding. When read, they are decoded to unicode strings for Python3 compatibility, and when written, they are encoded as specified. For backward compatibility, the default encoding in both cases is latin1.
Diffstat (limited to 'numpy/testing/nose_tools/utils.py')
0 files changed, 0 insertions, 0 deletions