Skip to content

Commit

Permalink
Change the part corresponding to preconditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lht97 committed Dec 20, 2024
1 parent 66f2faa commit f652641
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/private/verify_preconditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ function verify_preconditions(fun, x0, options)
end
end

num_blocks = options.num_blocks;
if ~(isintegerscalar(num_blocks) && num_blocks > 0)
error("num_blocks should be a positive integer.");
if isfield(options, "num_blocks")
if ~(isintegerscalar(options.num_blocks) && options.num_blocks > 0)
error("options.num_blocks should be a positive integer.");
end
end

BDS_list = ["DS", "CBDS", "PBDS", "RBDS", "PADS", "sCBDS"];
Expand Down

0 comments on commit f652641

Please sign in to comment.