Skip to content

Commit

Permalink
Added clone method for bounding boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
timbernat committed Apr 25, 2024
1 parent 4acd229 commit 1d4e645
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions polymerist/maths/lattices/coordops.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def __init__(self, points : np.ndarray[Shape[M, N], T]) -> None:
self.points = points
self.n_points, self.n_dims = points.shape

def clone(self) -> 'BoundingBox':
'''Create a copy of the current bounding box'''
return self.__class__(self.points)

@property
def dimensions(self) -> np.ndarray[Shape[N], int]:
'''The side lengths of the bounding box along each dimension'''
Expand Down

0 comments on commit 1d4e645

Please sign in to comment.