Skip to content

Commit

Permalink
Remove artificial restriction to refining at least 2 steps.
Browse files Browse the repository at this point in the history
Refining only one step is now allowed.
  • Loading branch information
Alexandre René committed Jul 10, 2024
1 parent 4d90db7 commit b8f38c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/emd_falsify/path_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ def generate_path_hierarchical_beta(
the space between a start and an end point, but it needs the value of _q_
to be given at those points. These end points are by default Φ=0 and Φ=1,
which correspond to the bounds of a quantile function.
res: Returned paths have length ``2**res``.
res: Returned paths have length ``2**res+1``, and therefore ``2**res`` increments.
Typical values of `res` are 6, 7 and 8, corresponding to paths of length
64, 128 and 256. Smaller may be useful to accelerate debugging. Larger values
increase the computation cost with typically negligible improvements in accuracy.
Expand All @@ -1276,8 +1276,8 @@ def generate_path_hierarchical_beta(
# raise ValueError("`Phi`, `qstar` and `Mvar` must all have "
# "the same shape. Values received have the respective shapes "
# f"{np.shape(Phi)}, {np.shape(qstar)}, {np.shape(Mvar)}")
if res <= 1:
raise ValueError("`res` must be greater than 1.")
if res < 1:
raise ValueError("`res` must be greater or equal to 1.")
rng = np.random.default_rng(rng) # No-op if `rng` is already a Generator
# Interpolation
N = 2**res + 1
Expand Down

0 comments on commit b8f38c2

Please sign in to comment.