at master 1.6 kB view raw
1From 7a0d0e625dd9e92159a145a26dd68ef3b61fde6e Mon Sep 17 00:00:00 2001 2From: Sergey Volkov <taranarmo@gmail.com> 3Date: Sun, 29 Jun 2025 10:54:00 +0200 4Subject: [PATCH] replace `ndarray.tostring` with `ndarray.tobytes` 5 6`ndarray.tostring` is deprecated since numpy 1.19 and removed in numpy 2.3 7https://numpy.org/doc/stable/release/2.3.0-notes.html 8--- 9 hickle/tests/test_06_load_astropy.py | 4 ++-- 10 1 file changed, 2 insertions(+), 2 deletions(-) 11 12diff --git a/hickle/tests/test_06_load_astropy.py b/hickle/tests/test_06_load_astropy.py 13index 628a4b3..b630bfd 100755 14--- a/hickle/tests/test_06_load_astropy.py 15+++ b/hickle/tests/test_06_load_astropy.py 16@@ -166,7 +166,7 @@ def test_astropy_time_array(h5_data,compression_kwargs): 17 assert reloaded.format == t1.format 18 assert reloaded.scale == t1.scale 19 for index in range(len(t1)): 20- assert reloaded.value[index].tostring() == t1.value[index].tostring() 21+ assert reloaded.value[index].tobytes() == t1.value[index].tobytes() 22 del h_dataset.attrs['np_dtype'] 23 24 reloaded = load_astropy.load_astropy_time_dataset(h_dataset,b'astropy_time',t1.__class__) 25@@ -174,7 +174,7 @@ def test_astropy_time_array(h5_data,compression_kwargs): 26 assert reloaded.format == t1.format 27 assert reloaded.scale == t1.scale 28 for index in range(len(t1)): 29- assert reloaded.value[index].tostring() == t1.value[index].tostring() 30+ assert reloaded.value[index].tobytes() == t1.value[index].tobytes() 31 loop_counter += 1 32 33