summaryrefslogtreecommitdiff
path: root/numpy/lib/format.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2014-02-14 18:08:00 -0700
committerCharles Harris <charlesr.harris@gmail.com>2014-02-14 18:08:00 -0700
commit33337281067bb1253f737b707fc783f6a6455e04 (patch)
treefd441ffa93602d84c7bbe25b6499570e12491088 /numpy/lib/format.py
parent792d1aeaa58bd8b7ff2688cc7dbf406bc1828b22 (diff)
parent2facd5cbdcaa08b61270c0c0760a39cd03acc007 (diff)
downloadnumpy-33337281067bb1253f737b707fc783f6a6455e04.tar.gz
Merge pull request #4257 from juliantaylor/tostring-depr
ENH: add tobytes and stop using tostring in documentation
Diffstat (limited to 'numpy/lib/format.py')
-rw-r--r--numpy/lib/format.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py
index 4cfbbe05d..631e92959 100644
--- a/numpy/lib/format.py
+++ b/numpy/lib/format.py
@@ -407,7 +407,7 @@ def write_array(fp, array, version=(1, 0)):
for chunk in numpy.nditer(
array, flags=['external_loop', 'buffered', 'zerosize_ok'],
buffersize=buffersize, order='F'):
- fp.write(chunk.tostring('C'))
+ fp.write(chunk.tobytes('C'))
else:
if isfileobj(fp):
array.tofile(fp)
@@ -415,7 +415,7 @@ def write_array(fp, array, version=(1, 0)):
for chunk in numpy.nditer(
array, flags=['external_loop', 'buffered', 'zerosize_ok'],
buffersize=buffersize, order='C'):
- fp.write(chunk.tostring('C'))
+ fp.write(chunk.tobytes('C'))
def read_array(fp):