File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ def rk_dependency_graph(rkm):
43
43
s = len (rkm )
44
44
K = np .zeros ((s + 1 ,s + 1 ))
45
45
K [:,:- 1 ] = np .vstack ((rkm .A ,rkm .b ))
46
- G = nx .from_numpy_matrix (np .abs (K .T )> 0 ,nx .DiGraph ())
46
+
47
+ try :
48
+ G = nx .from_numpy_matrix (np .abs (K .T )> 0 ,nx .DiGraph ())
49
+ except AttributeError :
50
+ # NOTE: networkx v3.0 removed from_numpy_matrix
51
+ G = nx .from_numpy_array (np .abs (K .T )> 0 , create_using = nx .DiGraph )
52
+
47
53
return G
48
54
49
55
def _longest_paths (G ):
Original file line number Diff line number Diff line change 46
46
>>> myrk = lsrk.load_low_storage('DDAS47')
47
47
>>> print(myrk)
48
48
DDAS4()7[2R]
49
- 2R Method of Tselios \ & Simos (2007)
49
+ 2R Method of Tselios & Simos (2007)
50
50
0.000 |
51
51
0.336 | 0.336
52
52
0.286 | 0.094 0.192
Original file line number Diff line number Diff line change @@ -204,14 +204,14 @@ def latex(self):
204
204
>>> print(merson.latex())
205
205
\begin{align}
206
206
\begin{array}{c|ccccc}
207
- & & & & & \\
207
+ & & & & & \\
208
208
\frac{1}{3} & \frac{1}{3} & & & & \\
209
209
\frac{1}{3} & \frac{1}{6} & \frac{1}{6} & & & \\
210
210
\frac{1}{2} & \frac{1}{8} & & \frac{3}{8} & & \\
211
211
1 & \frac{1}{2} & & - \frac{3}{2} & 2 & \\
212
212
\hline
213
- & \frac{1}{6} & & & \frac{2}{3} & \frac{1}{6}\\
214
- & \frac{1}{10} & & \frac{3}{10} & \frac{2}{5} & \frac{1}{5}
213
+ & \frac{1}{6} & & & \frac{2}{3} & \frac{1}{6}\\
214
+ & \frac{1}{10} & & \frac{3}{10} & \frac{2}{5} & \frac{1}{5}
215
215
\end{array}
216
216
\end{align}
217
217
"""
You can’t perform that action at this time.
0 commit comments