Skip to content

Commit a40bedd

Browse files
committed
review Thijs
Signed-off-by: Vincent Koppen <[email protected]>
1 parent 68adcd2 commit a40bedd

File tree

1 file changed

+2
-3
lines changed
  • src/power_grid_model_ds/_core/model/graphs/models

1 file changed

+2
-3
lines changed

src/power_grid_model_ds/_core/model/graphs/models/base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from contextlib import contextmanager
77
from typing import Generator
88

9-
import numpy as np
109
from numpy._typing import NDArray
1110

1211
from power_grid_model_ds._core.model.arrays.pgm_arrays import Branch3Array, BranchArray, NodeArray
@@ -183,7 +182,7 @@ def delete_branch3_array(self, branch_array: Branch3Array, raise_on_fail: bool =
183182
self.delete_branch_array(branches, raise_on_fail=raise_on_fail)
184183

185184
@contextmanager
186-
def tmp_remove_nodes(self, nodes: list[int] | NDArray[np.int32]) -> Generator:
185+
def tmp_remove_nodes(self, nodes: list[int]) -> Generator:
187186
"""Context manager that temporarily removes nodes and their branches from the graph.
188187
Example:
189188
>>> with graph.tmp_remove_nodes([1, 2, 3]):
@@ -248,7 +247,7 @@ def get_all_paths(self, ext_start_node_id: int, ext_end_node_id: int) -> list[li
248247

249248
return [self._internals_to_externals(path) for path in internal_paths]
250249

251-
def get_components(self, substation_nodes: NDArray[np.int32]) -> list[list[int]]:
250+
def get_components(self, substation_nodes: list[int]) -> list[list[int]]:
252251
"""Returns all separate components when the substation_nodes are removed of the graph as lists"""
253252
with self.tmp_remove_nodes(substation_nodes):
254253
internal_components = self._get_components()

0 commit comments

Comments
 (0)