Skip to content

Commit

Permalink
add a deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
bdpedigo committed Mar 25, 2024
1 parent fe4785d commit 57b80fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions networkframe/networkframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ def __len__(self) -> int:
The number of nodes in the network.
"""
return len(self.nodes)

def deepcopy(self):
return copy.deepcopy(self)

def reindex_nodes(self, index: pd.Index) -> Self:
"""Reindex `.nodes`, also removes edges as necessary.
Expand Down

0 comments on commit 57b80fe

Please sign in to comment.