Pixels sampled by sample_image can now be bounded.
Fixed problem with MCGSM's density gradients for zero-dimensional inputs.