Skip to content

Commit 80acf22

Browse files
authored
add __expr__ for mag class (#226)
1 parent ba415a5 commit 80acf22

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wkcuber/mag.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def __eq__(self, other):
4848
def __str__(self):
4949
return self.to_layer_name()
5050

51+
def __expr__(self):
52+
return f"Mag({self.to_layer_name()})"
53+
5154
def to_layer_name(self):
5255
x, y, z = self.mag
5356
if x == y and y == z:

0 commit comments

Comments
 (0)