Shared.delete_nodes

Shared.delete_nodes(nodes, update: bool = True, is_label: bool = True, **kwargs)[source]

Delete node(s) from Nodes object.

Parameters
nodesint, array of ints, str, or array of str

Indices or labels of nodes to delete.

updatebool, default=True

Whether to reset mapping of node labels to node ids.

is_labelbool, default=True

Whether to delete by label or internal node index.

return_indicesbool, default=False

If True, node indices of deleted nodes are returned.

Returns
ndarray, optional

If return_indices is True, node indices of deleted nodes are returned.

See also

numpy.delete