Skip to content

Commit

Permalink
Make __repr__ return valid python representation of the Roi object
Browse files Browse the repository at this point in the history
  • Loading branch information
pattonw committed Apr 12, 2024
1 parent dc075d4 commit 71a6ef4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions funlib/geometry/roi.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ def __ne__(self, other: object) -> bool:
return NotImplemented

def __repr__(self) -> str:
return f"Roi({self.offset}, {self.shape})"

def __str__(self) -> str:
if self.empty:
return "[empty ROI]"
slices = ", ".join(
Expand Down

0 comments on commit 71a6ef4

Please sign in to comment.