diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-06-21 17:25:39 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-06-21 17:29:19 -0600 |
commit | 8b955989a9f4fd6498c669af872732cdaee6c59a (patch) | |
tree | fa4890e389596bfaf1f64022adc9fd94f8a67132 /numpy/lib/npyio.py | |
parent | f0c898b6017cc011561d7f1e611e08283ecfdb08 (diff) | |
download | numpy-8b955989a9f4fd6498c669af872732cdaee6c59a.tar.gz |
DOC: Fix examples in npyio.py to properly import StringIO.
In two places they were doing
>>> from StringIO import StringIO
Since Python 2.6 that should be
>>> from io import StringIO
Closes #5995.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 078c6d7ca..0cf627e7c 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -798,7 +798,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, Examples -------- - >>> from StringIO import StringIO # StringIO behaves like a file object + >>> from io import StringIO # StringIO behaves like a file object >>> c = StringIO("0 1\\n2 3") >>> np.loadtxt(c) array([[ 0., 1.], @@ -1420,7 +1420,7 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None, Examples --------- - >>> from StringIO import StringIO + >>> from io import StringIO >>> import numpy as np Comma delimited file with mixed dtype |