refactored weighted elements on `NumPy`'s image to allow probability distributions with floats