-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to NetworkX 3.2 * Use mamba instead for faster environment creation * Drop Python 3.8
- Loading branch information
Showing
8 changed files
with
181 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
def get_info(): | ||
return { | ||
"backend_name": "graphblas", | ||
"project": "graphblas-algorithms", | ||
"package": "graphblas_algorithms", | ||
"url": "https://github.com/python-graphblas/graphblas-algorithms", | ||
"short_summary": "Fast, OpenMP-enabled backend using GraphBLAS", | ||
# "description": "TODO", | ||
"functions": { | ||
"adjacency_matrix": {}, | ||
"all_pairs_bellman_ford_path_length": { | ||
"extra_parameters": { | ||
"chunksize": "Split the computation into chunks; " | ||
'may specify size as string or number of rows. Default "10 MiB"', | ||
}, | ||
}, | ||
"all_pairs_shortest_path_length": { | ||
"extra_parameters": { | ||
"chunksize": "Split the computation into chunks; " | ||
'may specify size as string or number of rows. Default "10 MiB"', | ||
}, | ||
}, | ||
"ancestors": {}, | ||
"average_clustering": {}, | ||
"bellman_ford_path": {}, | ||
"bellman_ford_path_length": {}, | ||
"bethe_hessian_matrix": {}, | ||
"bfs_layers": {}, | ||
"boundary_expansion": {}, | ||
"clustering": {}, | ||
"complement": {}, | ||
"compose": {}, | ||
"conductance": {}, | ||
"cut_size": {}, | ||
"degree_centrality": {}, | ||
"descendants": {}, | ||
"descendants_at_distance": {}, | ||
"difference": {}, | ||
"directed_modularity_matrix": {}, | ||
"disjoint_union": {}, | ||
"edge_boundary": {}, | ||
"edge_expansion": {}, | ||
"efficiency": {}, | ||
"ego_graph": {}, | ||
"eigenvector_centrality": {}, | ||
"fast_could_be_isomorphic": {}, | ||
"faster_could_be_isomorphic": {}, | ||
"floyd_warshall": {}, | ||
"floyd_warshall_numpy": {}, | ||
"floyd_warshall_predecessor_and_distance": {}, | ||
"full_join": {}, | ||
"generalized_degree": {}, | ||
"google_matrix": {}, | ||
"has_path": {}, | ||
"hits": {}, | ||
"in_degree_centrality": {}, | ||
"inter_community_edges": {}, | ||
"intersection": {}, | ||
"intra_community_edges": {}, | ||
"is_connected": {}, | ||
"is_dominating_set": {}, | ||
"is_isolate": {}, | ||
"is_k_regular": {}, | ||
"isolates": {}, | ||
"is_regular": {}, | ||
"is_simple_path": {}, | ||
"is_tournament": {}, | ||
"is_triad": {}, | ||
"is_weakly_connected": {}, | ||
"katz_centrality": {}, | ||
"k_truss": {}, | ||
"laplacian_matrix": {}, | ||
"lowest_common_ancestor": {}, | ||
"mixing_expansion": {}, | ||
"modularity_matrix": {}, | ||
"mutual_weight": {}, | ||
"negative_edge_cycle": {}, | ||
"node_boundary": {}, | ||
"node_connected_component": {}, | ||
"node_expansion": {}, | ||
"normalized_cut_size": {}, | ||
"normalized_laplacian_matrix": {}, | ||
"number_of_isolates": {}, | ||
"out_degree_centrality": {}, | ||
"overall_reciprocity": {}, | ||
"pagerank": {}, | ||
"reciprocity": {}, | ||
"reverse": {}, | ||
"score_sequence": {}, | ||
"single_source_bellman_ford_path_length": {}, | ||
"single_source_shortest_path_length": {}, | ||
"single_target_shortest_path_length": {}, | ||
"s_metric": {}, | ||
"square_clustering": { | ||
"extra_parameters": { | ||
"chunksize": "Split the computation into chunks; " | ||
'may specify size as string or number of rows. Default "256 MiB"', | ||
}, | ||
}, | ||
"symmetric_difference": {}, | ||
"tournament_matrix": {}, | ||
"transitivity": {}, | ||
"triangles": {}, | ||
"union": {}, | ||
"volume": {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
import warnings | ||
|
||
from graphblas_algorithms import algorithms | ||
from graphblas_algorithms.classes.digraph import to_graph | ||
|
||
from .exception import NetworkXError | ||
|
||
__all__ = ["s_metric"] | ||
|
||
|
||
def s_metric(G, normalized=True): | ||
if normalized: | ||
raise NetworkXError("Normalization not implemented") | ||
def s_metric(G, **kwargs): | ||
if kwargs: | ||
if "normalized" in kwargs: | ||
warnings.warn( | ||
"\n\nThe `normalized` keyword is deprecated and will be removed\n" | ||
"in the future. To silence this warning, remove `normalized`\n" | ||
"when calling `s_metric`.\n\nThe value of `normalized` is ignored.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
else: | ||
raise TypeError(f"s_metric got an unexpected keyword argument '{kwargs.popitem()[0]}'") | ||
G = to_graph(G) | ||
return algorithms.s_metric(G) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters