Skip to content

Commit a4cc88c

Browse files
committed
Updated the printing function
- add greeting to mini_meta_delta repr
1 parent adbe196 commit a4cc88c

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,4 @@ real.py
128128

129129
TEST.ipynb
130130
TrhCsCh.csv
131+
Untitled.ipynb

dabest/_classes.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,13 @@ def __permutation_test(self):
933933

934934

935935

936-
def __repr__(self, sigfig=3):
936+
def __repr__(self, header=True, sigfig=3):
937+
from .__init__ import __version__
938+
import datetime as dt
939+
import numpy as np
940+
941+
from .misc_tools import print_greeting
942+
937943

938944
RM_STATUS = {'baseline' : 'for repeated measures against baseline \n',
939945
'sequential': 'for the sequential design of repeated-measures experiment \n',
@@ -964,6 +970,9 @@ def __repr__(self, sigfig=3):
964970
out2 = "is {es} [{ci}%CI {bca_low}, {bca_high}].".format(**ci_out)
965971
out = out1 + out2
966972

973+
if header is True:
974+
out = print_greeting() + "\n" + "\n" + out
975+
967976

968977
pval_rounded = base_string_fmt.format(self.pvalue_permutation)
969978

@@ -2169,7 +2178,7 @@ def __pre_calc(self):
21692178
self.__mini_meta_delta = MiniMetaDelta(self,
21702179
self.__permutation_count,
21712180
self.__ci)
2172-
reprs.append(self.__mini_meta_delta.__repr__())
2181+
reprs.append(self.__mini_meta_delta.__repr__(header=False))
21732182
elif self.__effect_size != "mean_diff":
21742183
self.__mini_meta_delta = "Weighted delta is not supported for {}.".format(self.__effect_size)
21752184
else:

0 commit comments

Comments
 (0)