Skip to content

Commit

Permalink
fix copy
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkoham committed Dec 7, 2021
1 parent 8af7388 commit 36367eb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# that they have been altered from the originals.

"""General Lattice."""
from copy import deepcopy
from dataclasses import asdict, dataclass
from typing import Callable, List, Optional, Sequence, Tuple, Union

Expand Down Expand Up @@ -148,7 +149,7 @@ def weighted_edge_list(self) -> WeightedEdgeList:

def copy(self) -> "Lattice":
"""Return a copy of the lattice."""
return self.__class__(self.graph)
return deepcopy(self)

@classmethod
def from_nodes_and_edges(
Expand Down

0 comments on commit 36367eb

Please sign in to comment.