Question about `genrand_range`
parnalte opened this issue · comments
Hi,
I have a question about the intended usage of the function genrand_range
. From the docs I understood that, for small masks, one would want to choose a box small enough to speed the calculation up but large enough to contain the full mask.
However, when I call the function in this way I get a ValueError: no corners are contained within mask
. This is because the code requires that at least one of the corners of the box is contained in the mask:
Lines 1589 to 1595 in 0aeec8c
However, if one of the corners is inside the mask, I understand that it is no longer possible to generate random points from the full mask (only from the part of the mask that overlaps with the box). So, is this a bug or am I misunderstanding the intended usage of the function?
Thanks,
Pablo.
Good point, I think this is a bug.
Great. I think it is solved now. Thanks.