@@ -731,7 +731,7 @@ def _sum_by_group(
731731) -> tuple [NDArray [np .int64 ], NDArray [np .float64 ], NDArray [np .float64 ]]:
732732 order : NDArray [np .int64 ] = np .argsort (bus )
733733 bus = bus [order ]
734- index : NDArray [np . bool ] = np .ones (len (bus ), 'bool' )
734+ index : NDArray [bool ] = np .ones (len (bus ), 'bool' )
735735 index [:- 1 ] = bus [1 :] != bus [:- 1 ]
736736 bus = bus [index ]
737737 first_val = first_val [order ]
@@ -1058,8 +1058,8 @@ def _write_to_object_attribute(
10581058
10591059
10601060def _set_isolated_nodes_out_of_service (
1061- ppc : PyPowerNetwork , bus_not_reachable : NDArray [np . bool ], dc : bool = False
1062- ) -> tuple [NDArray [np . bool ], int , int , PyPowerNetwork ]:
1061+ ppc : PyPowerNetwork , bus_not_reachable : NDArray [bool ], dc : bool = False
1062+ ) -> tuple [NDArray [bool ], int , int , PyPowerNetwork ]:
10631063 isolated_nodes = np .nonzero (bus_not_reachable )[0 ]
10641064 if len (isolated_nodes ) > 0 :
10651065 logger .debug ("There are isolated buses in the network! (%i nodes in the PPC)" % len (isolated_nodes ))
@@ -1080,7 +1080,7 @@ def _set_isolated_nodes_out_of_service(
10801080 return isolated_nodes , pus , qus , ppc
10811081
10821082
1083- def _check_connectivity_opf (ppc : PyPowerNetwork ) -> tuple [NDArray [np . bool ], int , int ]:
1083+ def _check_connectivity_opf (ppc : PyPowerNetwork ) -> tuple [NDArray [bool ], int , int ]:
10841084 """
10851085 Checks if the ppc contains isolated buses and changes slacks to PV nodes if multiple slacks are
10861086 in net.
@@ -1120,7 +1120,7 @@ def _check_connectivity_opf(ppc: PyPowerNetwork) -> tuple[NDArray[np.bool], int,
11201120 return isolated_nodes , pus , qus
11211121
11221122
1123- def _check_connectivity (ppc : PyPowerNetwork ) -> tuple [NDArray [np . bool ], int , int , NDArray [np . bool ], int , int ]:
1123+ def _check_connectivity (ppc : PyPowerNetwork ) -> tuple [NDArray [bool ], int , int , NDArray [bool ], int , int ]:
11241124 """
11251125 Checks if the ppc contains isolated buses. If yes this isolated buses are set out of service
11261126 :param ppc: pypower case file
@@ -1228,14 +1228,14 @@ def _subnetworks(ppc: PyPowerNetwork) -> list[list[int]]:
12281228
12291229
12301230def _python_set_elements_oos (
1231- ti : NDArray [np .int64 ], tis : NDArray [np . bool ], bis : NDArray [np . bool ], lis : NDArray [np . bool ]
1231+ ti : NDArray [np .int64 ], tis : NDArray [bool ], bis : NDArray [bool ], lis : NDArray [bool ]
12321232) -> None : # pragma: no cover
12331233 for i in range (len (ti )):
12341234 if tis [i ] and bis [ti [i ]]:
12351235 lis [i ] = True
12361236
12371237
1238- def _python_set_isolated_buses_oos (bus_in_service : NDArray [np . bool ], ppc_bus_isolated : NDArray [np . bool ],
1238+ def _python_set_isolated_buses_oos (bus_in_service : NDArray [bool ], ppc_bus_isolated : NDArray [bool ],
12391239 bus_lookup : NDArray [np .int64 ]): # pragma: no cover
12401240 for k in range (len (bus_in_service )):
12411241 if ppc_bus_isolated [bus_lookup [k ]]:
@@ -1923,7 +1923,7 @@ def SVabc_from_SV012(
19231923 S012 : NDArray [NumpyDType ],
19241924 V012 : NDArray [NumpyDType ],
19251925 n_res : int | None = None ,
1926- idx : NDArray [np . bool ] | None = None ,
1926+ idx : NDArray [bool ] | None = None ,
19271927) -> tuple [NDArray [NumpyDType ], NDArray [NumpyDType ]]:
19281928 if n_res is None :
19291929 n_res = S012 .shape [1 ]
0 commit comments