Skip to content

Commit 889c617

Browse files
author
Nick
committed
Fixed error in Cbox.__repr__
1 parent 3ea1f11 commit 889c617

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

pba/cbox.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,7 @@ def __init__(self, *args, **kwargs):
3535
super().__init__(*args, **kwargs)
3636

3737
def __repr__(self):
38-
if self.mean_left == self.mean_right:
39-
mean_text = f"{round(self.mean_left, 4)}"
40-
else:
41-
mean_text = f"[{round(self.mean_left, 4)}, {round(self.mean_right, 4)}]"
42-
43-
if self.var_left == self.var_right:
44-
var_text = f"{round(self.var_left, 4)}"
45-
else:
46-
var_text = f"[{round(self.var_left, 4)}, {round(self.var_right, 4)}]"
47-
48-
range_text = f"[{round(np.min([self.left, self.right]), 4), round(np.max([self.left, self.right]), 4)}"
49-
50-
if self.shape is None:
51-
shape_text = " "
52-
else:
53-
shape_text = f" {self.shape}" # space to start; see below lacking space
54-
55-
return f"Cbox: ~ {shape_text} (range={range_text}, mean={mean_text}, var={var_text})"
38+
return super().__str__().replace("Pbox","Cbox")
5639

5740
__str__ = __repr__
5841

0 commit comments

Comments
 (0)