File: numpy-2

package info (click to toggle)
python-pomegranate 0.15.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 36,948 kB
  • sloc: python: 11,489; makefile: 259; sh: 28
file content (80 lines) | stat: -rw-r--r-- 2,622 bytes parent folder | download | duplicates (2)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Author: Michael R. Crusoe <crusoe@debian.org>
Description: Support numpy 2.x
Forwarded: not-needed

Not forwarded because this is for an older version of pomegranate; upstream has
already added numpy 2.x support in a new major version with breaking changes.
The only user of these packages in Debian has not upgraded to the new version.
See debian/README.source for details.

--- python-pomegranate.orig/dev-requirements.txt
+++ python-pomegranate/dev-requirements.txt
@@ -2,7 +2,7 @@
 pandas
 cython >= 0.22.1
 nose
-numpy >= 1.20.0, < 2.0.0
+numpy >= 1.20.0
 scipy >= 0.17.0
 sphinx >= 4.2.0
 sphinx-rtd-theme >= 0.2.0, < 0.3.0
--- python-pomegranate.orig/requirements.txt
+++ python-pomegranate/requirements.txt
@@ -1,6 +1,6 @@
-numpy >= 1.20.0, < 2.0.0
+numpy >= 1.20.0
 joblib >= 0.9.0b4
 networkx >= 2.4
 scipy >= 0.17.0
 pyyaml
-cython >= 0.29.14
\ No newline at end of file
+cython >= 0.29.14
--- python-pomegranate.orig/setup.py
+++ python-pomegranate/setup.py
@@ -85,12 +85,12 @@
     cmdclass={'build_ext':build_ext},
     setup_requires=[
         "cython >= 0.22.1",
-        "numpy >= 1.20.0, < 2.0",
+        "numpy >= 1.20.0",
         "scipy >= 0.17.0"
     ],
     install_requires=[
         "cython >= 0.22.1",
-        "numpy >= 1.20.0, < 2.0",
+        "numpy >= 1.20.0",
         "joblib >= 0.9.0b4",
         "networkx >= 2.4",
         "scipy >= 0.17.0",
--- python-pomegranate.orig/pomegranate/distributions/distributions.pyx
+++ python-pomegranate/pomegranate/distributions/distributions.pyx
@@ -257,7 +257,7 @@
 		elif d['name'] == 'DiscreteDistribution':
 			dp = d['parameters'][0]
 
-			if d['dtype'] in ('str', 'unicode', 'numpy.string_'):
+			if d['dtype'] in ('str', 'unicode', 'numpy.bytes_'):
 				dist = {str(key) : value for key, value in dp.items()}
 			elif d['dtype'] == 'bool':
 				dist = {key == 'True' : value for key, value in dp.items()}
@@ -280,7 +280,7 @@
 			for row in d['table']:
 				table.append([])
 				for dtype, item in zip(d['dtypes'], row):
-					if dtype in ('str', 'unicode', 'numpy.string_'):
+					if dtype in ('str', 'unicode', 'numpy.bytes_'):
 						table[-1].append(str(item))
 					elif dtype == 'bool':
 						table[-1].append(item == 'True')
--- python-pomegranate.orig/pomegranate/utils.pyx
+++ python-pomegranate/pomegranate/utils.pyx
@@ -477,7 +477,7 @@
 
 def _check_nan(X):
 	"""Checks to see if a value is nan, either as a float or a string."""
-	if isinstance(X, (str, unicode, numpy.string_)):
+	if isinstance(X, (str, unicode, numpy.bytes_)):
 		return X == 'nan'
 	if isinstance(X, (float, numpy.float32, numpy.float64)):
 		return isnan(X)