@@ -99,16 +99,16 @@ def delete_vertices(graph: _Graph, vertices: VertexSelector) -> None:
9999 igraph_delete_vertices (c_graph , c_vertices .unwrap ())
100100
101101
102- def delete_vertices_idx (graph : _Graph , vertices : VertexSelector ) -> Tuple [npt .NDArray [np_type_of_igraph_integer_t ], npt .NDArray [np_type_of_igraph_integer_t ]]:
103- """Type-annotated wrapper for ``igraph_delete_vertices_idx ``."""
102+ def delete_vertices_map (graph : _Graph , vertices : VertexSelector ) -> Tuple [npt .NDArray [np_type_of_igraph_integer_t ], npt .NDArray [np_type_of_igraph_integer_t ]]:
103+ """Type-annotated wrapper for ``igraph_delete_vertices_map ``."""
104104 # Prepare input arguments
105105 c_graph = graph
106106 c_vertices = vertex_selector_to_igraph_vs_t (vertices , graph )
107107 c_idx = _VectorInt .create (0 )
108108 c_invidx = _VectorInt .create (0 )
109109
110110 # Call wrapped function
111- igraph_delete_vertices_idx (c_graph , c_vertices .unwrap (), c_idx , c_invidx )
111+ igraph_delete_vertices_map (c_graph , c_vertices .unwrap (), c_idx , c_invidx )
112112
113113 # Prepare output arguments
114114 idx = igraph_vector_int_t_to_numpy_array (c_idx )
@@ -1696,17 +1696,18 @@ def distances_bellman_ford(graph: _Graph, weights: Iterable[float], from_: Verte
16961696 return res
16971697
16981698
1699- def distances_johnson (graph : _Graph , weights : Iterable [ float ], from_ : VertexSelector = "all" , to : VertexSelector = "all" ) -> npt .NDArray [np_type_of_igraph_real_t ]:
1699+ def distances_johnson (graph : _Graph , from_ : VertexSelector = "all" , to : VertexSelector = "all" , weights : Optional [ Iterable [ float ]] = None , mode : NeighborMode = NeighborMode . OUT ) -> npt .NDArray [np_type_of_igraph_real_t ]:
17001700 """Type-annotated wrapper for ``igraph_distances_johnson``."""
17011701 # Prepare input arguments
17021702 c_graph = graph
17031703 c_res = _Matrix .create (0 )
17041704 c_from = vertex_selector_to_igraph_vs_t (from_ , graph )
17051705 c_to = vertex_selector_to_igraph_vs_t (to , graph )
17061706 c_weights = edge_weights_to_igraph_vector_t_view (weights , graph )
1707+ c_mode = c_int (mode )
17071708
17081709 # Call wrapped function
1709- igraph_distances_johnson (c_graph , c_res , c_from .unwrap (), c_to .unwrap (), c_weights )
1710+ igraph_distances_johnson (c_graph , c_res , c_from .unwrap (), c_to .unwrap (), c_weights , c_mode )
17101711
17111712 # Prepare output arguments
17121713 res = igraph_matrix_t_to_numpy_array (c_res )
@@ -5942,7 +5943,20 @@ def has_attribute_table() -> bool:
59425943
59435944# igraph_status: no Python type known for type: EXTRA
59445945
5945- # igraph_strerror: no Python type known for type: ERROR
5946+
5947+ def strerror (igraph_errno : int ) -> str :
5948+ """Type-annotated wrapper for ``igraph_strerror``."""
5949+ # Prepare input arguments
5950+ c_igraph_errno = igraph_errno
5951+
5952+ # Call wrapped function
5953+ c__result = igraph_strerror (c_igraph_errno )
5954+
5955+ # Prepare return value
5956+ py__result = bytes_to_str (c__result )
5957+
5958+ # Construct return value
5959+ return py__result
59465960
59475961
59485962def expand_path_to_pairs (path : Iterable [VertexLike ]) -> None :
@@ -5997,7 +6011,7 @@ def version() -> Tuple[str, int, int, int]:
59976011 igraph_version (c_version_string , c_major , c_minor , c_subminor )
59986012
59996013 # Prepare output arguments
6000- version_string = c_version_string . value . decode ( "utf-8" , "replace" )
6014+ version_string = bytes_to_str ( c_version_string )
60016015 major = c_major .value
60026016 minor = c_minor .value
60036017 subminor = c_subminor .value
0 commit comments