Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ dependencies = [
"ipykernel",
"ipywidgets",
"jupyterlab",
"hnswlib>=0.8.0",
"pacmap>=0.9.1",
]

[project.optional-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions src/topo/_compat/scipy_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

import numpy as np
from scipy.sparse import csr_matrix, diags, identity, issparse
from scipy.sparse import csr_matrix, diags, identity
from scipy.sparse.csgraph import (
connected_components as scipy_connected_components,
)
Expand All @@ -17,12 +17,12 @@
shortest_path as scipy_shortest_path,
)

from topo.base.graph_matrix import as_csr_matrix


def as_csr_graph(graph) -> csr_matrix:
"""Return graph as CSR sparse matrix."""
if issparse(graph):
return graph.tocsr()
return csr_matrix(graph)
return as_csr_matrix(graph, "graph")


def graph_connected_components(
Expand Down
47 changes: 0 additions & 47 deletions src/topo/_compat/sklearn_manifold.py

This file was deleted.

Loading
Loading