Closed chaoming0625 closed 8 months ago
Have changed the algorithm of truncated _normal
sampling using methods from
The truncated_normal
is not straightforward to multiply the scale
and shift the loc
. I have checked the algorithms and confirmed the results using methods in https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf
One more thing, I have add the checking for the valid setting of loc
, scale
, upper
, and lower
, in order to avoid the incorrent sampling.
brainpy.math.random.truncated_normal