@@ -933,10 +933,11 @@ def __init__(self, control, test, effect_size,
933933 bootstraps = ci2g .compute_bootstrapped_diff (
934934 control , test , is_paired , effect_size ,
935935 resamples , random_seed )
936- self .__bootstraps = npsort ( bootstraps )
936+ self .__bootstraps = bootstraps
937937 else :
938- self .__bootstraps = npsort ( self .__test - self .__control )
938+ self .__bootstraps = self .__test - self .__control
939939
940+ sorted_bootstraps = npsort (self .__bootstraps )
940941 # Added in v0.2.6.
941942 # Raises a UserWarning if there are any infiinities in the bootstraps.
942943 num_infinities = len (self .__bootstraps [isinf (self .__bootstraps )])
@@ -962,8 +963,8 @@ def __init__(self, control, test, effect_size,
962963 self .__bca_interval_idx = (bca_idx_low , bca_idx_high )
963964
964965 if ~ isnan (bca_idx_low ) and ~ isnan (bca_idx_high ):
965- self .__bca_low = self . __bootstraps [bca_idx_low ]
966- self .__bca_high = self . __bootstraps [bca_idx_high ]
966+ self .__bca_low = sorted_bootstraps [bca_idx_low ]
967+ self .__bca_high = sorted_bootstraps [bca_idx_high ]
967968
968969 err1 = "The $lim_type limit of the interval"
969970 err2 = "was in the $loc 10 values."
@@ -1001,8 +1002,8 @@ def __init__(self, control, test, effect_size,
10011002 pct_idx_high = int ((1 - (self .__alpha / 2 )) * resamples )
10021003
10031004 self .__pct_interval_idx = (pct_idx_low , pct_idx_high )
1004- self .__pct_low = self . __bootstraps [pct_idx_low ]
1005- self .__pct_high = self . __bootstraps [pct_idx_high ]
1005+ self .__pct_low = sorted_bootstraps [pct_idx_low ]
1006+ self .__pct_high = sorted_bootstraps [pct_idx_high ]
10061007
10071008 else :
10081009 self .__pct_interval_idx = None
0 commit comments