Skip to content

Commit

Permalink
fixed sorting error in exact vol 1D
Browse files Browse the repository at this point in the history
  • Loading branch information
lcgraham committed May 9, 2016
1 parent 5fca1d3 commit b6efc02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bet/calculateP/calculateP.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,9 @@ def exact_volume_1D(samples, input_domain, distribution='uniform', a=None,
edges = scipy.stats.beta.cdf(edges, a=a, b=b,
loc=input_domain[:, 0], scale=domain_width)
# calculate difference between right and left of each cell and renormalize
lam_vol = np.squeeze(edges[1:, :] - edges[:-1, :])
sorted_lam_vol = np.squeeze(edges[1:, :] - edges[:-1, :])
lam_vol = np.zeros(sorted_lam_vol.shape)
lam_vol[sort_ind] = sorted_lam_vol
if distribution == 'uniform':
lam_vol = lam_vol/domain_width
# Set up local arrays for parallelism
Expand Down

0 comments on commit b6efc02

Please sign in to comment.