File: 0002-Compatibility-with-numpy-v1.24.patch

package info (click to toggle)
cyarray 1.1-9
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 612 kB
  • sloc: python: 555; ansic: 160; makefile: 15
file content (59 lines) | stat: -rw-r--r-- 2,141 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sat, 14 Jan 2023 16:08:54 +0000
Subject: Compatibility with numpy v1.24

Origin: https://github.com/pypr/cyarray
Forwarded: not-needed
---
 cyarray/tests/test_carray.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/cyarray/tests/test_carray.py b/cyarray/tests/test_carray.py
index 5efcaf9..61f0bde 100644
--- a/cyarray/tests/test_carray.py
+++ b/cyarray/tests/test_carray.py
@@ -224,22 +224,22 @@ class TestLongArray(unittest.TestCase):
         l1 = LongArray(10)
         l1.set_data(numpy.arange(10))
         rem = [0, 4, 3]
-        l1.remove(numpy.array(rem, dtype=numpy.int))
+        l1.remove(numpy.array(rem, dtype=int))
         self.assertEqual(l1.length, 7)
         self.assertEqual(numpy.allclose([7, 1, 2, 8, 9, 5, 6],
                                         l1.get_npy_array()), True)
 
-        l1.remove(numpy.array(rem, dtype=numpy.int))
+        l1.remove(numpy.array(rem, dtype=int))
         self.assertEqual(l1.length, 4)
         self.assertEqual(numpy.allclose(
             [6, 1, 2, 5], l1.get_npy_array()), True)
 
         rem = [0, 1, 3]
-        l1.remove(numpy.array(rem, dtype=numpy.int))
+        l1.remove(numpy.array(rem, dtype=int))
         self.assertEqual(l1.length, 1)
         self.assertEqual(numpy.allclose([2], l1.get_npy_array()), True)
 
-        l1.remove(numpy.array([0], dtype=numpy.int))
+        l1.remove(numpy.array([0], dtype=int))
         self.assertEqual(l1.length, 0)
         self.assertEqual(len(l1.get_npy_array()), 0)
 
@@ -250,7 +250,7 @@ class TestLongArray(unittest.TestCase):
 
         # When
         rem = [3, 1]
-        l1.remove(numpy.array(rem, dtype=numpy.int), stride=3)
+        l1.remove(numpy.array(rem, dtype=int), stride=3)
 
         # Then
         self.assertEqual(l1.length, 6)
@@ -263,7 +263,7 @@ class TestLongArray(unittest.TestCase):
 
         # When
         rem = [0, 2]
-        l1.remove(numpy.array(rem, dtype=numpy.int), stride=3)
+        l1.remove(numpy.array(rem, dtype=int), stride=3)
 
         # Then
         self.assertEqual(l1.length, 6)