Skip to content

Commit 05ade11

Browse files
committed
Fixed numpy import error on numpy > 2.0.0
1 parent 6a9cebf commit 05ade11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

grakel/kernels/random_walk.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
from itertools import product
99

10-
from numpy import ComplexWarning
10+
if np.__version__ < '2.0.0':
11+
from numpy import ComplexWarning
12+
else:
13+
from numpy.exceptions import ComplexWarning
1114
from numpy.linalg import inv
1215
from numpy.linalg import eig
1316
from numpy.linalg import multi_dot

0 commit comments

Comments
 (0)