Closed oschulz closed 6 years ago
Hi Oliver. That's correct, those methods require ndim
to be at least 2. Did you run into some issues because of this?
Hi, thanks - should have looked into the Cuba docs. :-) I did run into issues, but it was only in a toy case. But maybe divonne
and cuhre
should throw an ArgumentError
if run for one dimension, just in case?
Currently I forcibly set ndim = 2
if it's equal to 1: https://github.com/giordano/Cuba.jl/blob/9d0354a19a3968d8f02c72d1291808cce8798908/src/cuhre.jl#L94 I thought that this would have been quite harmless, but I see that using something like norm
can lead to unexpected results.
I will change the default value of ndim
for cuhre and divonne to 2, throw an error for lower values, better document this.
grazie!
Bitte ;-) I've merged PR #15, do let me know if you need a tagged version of this package.
Thanks, no, I don't need an urgent tag on this.
When integrating in one dimension,
vegas
andsuave
call the integrand with a vectir of length 1 (as expected), butdivonne
andcuhre
pass a vector of length 2: