Skip to content

Commit

Permalink
fix: circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
akhileshh committed Sep 12, 2023
1 parent c069914 commit c6b6491
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions pychunkedgraph/debug/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

import numpy as np

from ..graph import ChunkedGraph
from ..graph.utils.basetypes import NODE_ID


def print_attrs(d):
for k, v in d.items():
Expand All @@ -18,12 +15,7 @@ def print_attrs(d):
print(v)


def print_node(
cg: ChunkedGraph,
node: NODE_ID,
indent: int = 0,
stop_layer: int = 2,
) -> None:
def print_node(cg, node: np.uint64, indent: int = 0, stop_layer: int = 2) -> None:
children = cg.get_children(node)
print(f"{' ' * indent}{node}[{len(children)}]")
if cg.get_chunk_layer(node) <= stop_layer:
Expand All @@ -32,8 +24,8 @@ def print_node(
print_node(cg, child, indent=indent + 4, stop_layer=stop_layer)


def get_l2children(cg: ChunkedGraph, node: NODE_ID) -> np.ndarray:
nodes = np.array([node], dtype=NODE_ID)
def get_l2children(cg, node: np.uint64) -> np.ndarray:
nodes = np.array([node], dtype=np.uint64)
layers = cg.get_chunk_layers(nodes)
assert np.all(layers > 2), "nodes must be at layers > 2"
l2children = []
Expand Down

0 comments on commit c6b6491

Please sign in to comment.