From 7668a3353b87b4b1d4a5a31cec16bce36200812d Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Mon, 30 Mar 2020 11:17:13 +0100 Subject: 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). --- numpy/lib/user_array.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'numpy/lib/user_array.py') 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()) -- cgit v1.2.1