1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Description: update for NumPy 2.3
ndarray.tostring was deprecated in favor of .tobytes since NumPy 1.19, and
removed in NumPy 2.3.
Author: Thibaut Paumard <thibaut@debian.org>
Origin: vendor
Bug: https://github.com/LLNL/pyorick/issues/8
Bug-Debian: https://bugs.debian.org/1114719
Last-Update: 2025-09-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/pyorick/pyorick.py
+++ b/pyorick/pyorick.py
@@ -1307,7 +1307,7 @@
@staticmethod
def array2string(a):
- s = a.tostring().decode('iso_8859_1')
+ s = a.tobytes().decode('iso_8859_1')
if s.endswith('\x00'):
s = s[0:-1]
return s
@@ -1500,7 +1500,7 @@
@staticmethod
def pickleloads(chars):
if ypickling_prefix == bytearray(chars[0:ypickling_nprefix]):
- return pickle.loads(chars[ypickling_nprefix:].tostring())
+ return pickle.loads(chars[ypickling_nprefix:].tobytes())
return chars
def nplongs(*args):
|