summaryrefslogtreecommitdiff
path: root/numpy/lib/user_array.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-03-30 11:17:13 +0100
committerEric Wieser <wieser.eric@gmail.com>2020-03-30 18:25:57 +0100
commit7668a3353b87b4b1d4a5a31cec16bce36200812d (patch)
tree156afd6d3bee57e67ef1313e7671a230ad906f9a /numpy/lib/user_array.py
parentb3f41eeafd2708a6b519cf3c7ba3576dfa1cc5b3 (diff)
downloadnumpy-7668a3353b87b4b1d4a5a31cec16bce36200812d.tar.gz
DEP: Deprecate ndarray.tostring()
The corresponding `array.array.tostring()` in the standard library has been deprecated in favor of `tobytes` since Python 3.1 (python/cpython@1ce3eb5c5b4830e69b21865e2d723e22749544e0).
Diffstat (limited to 'numpy/lib/user_array.py')
-rw-r--r--numpy/lib/user_array.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/user_array.py b/numpy/lib/user_array.py
index 9c266fd6b..a23ccc07e 100644
--- a/numpy/lib/user_array.py
+++ b/numpy/lib/user_array.py
@@ -231,6 +231,10 @@ class container:
""
return self.array.tostring()
+ def tobytes(self):
+ ""
+ return self.array.tobytes()
+
def byteswap(self):
""
return self._rc(self.array.byteswap())