dasi.utils.networkx.utils¶
Functions
|
|
|
|
|
Divides two matricies, replacing NaN with np.inf. |
|
|
|
|
|
|
|
Returns an ndarray of same shape as A and B, selecting elements from either A or B according to the condition. |
|
Sort a cyclic array, maintaining order. |
Functions
|
Divides two matricies, replacing NaN with np.inf. |
|
Returns an ndarray of same shape as A and B, selecting elements from either A or B according to the condition. |
|
Sort a cyclic array, maintaining order. |
-
dasi.utils.networkx.utils.
divide
(mata, matb)[source]¶ Divides two matricies, replacing NaN with np.inf.
-
dasi.utils.networkx.utils.
select_from_arrs
(A, B, condition)[source]¶ Returns an ndarray of same shape as A and B, selecting elements from either A or B according to the condition.
Note
This method is called many thousands of times in the
execution of the modified floyd-warshall algorithm. This implementation is 2X faster than whatever is implemented in np.choose, resulting in significant speed improvements.