lgca.nove_ib_interactions.trunc_gauss

lgca.nove_ib_interactions.trunc_gauss(lower, upper, mu, sigma=0.1, size=1, rng=None)

Draw samples from a truncated normal distribution.

Parameters:
  • lower (float) – Lower bound of the distribution.

  • upper (float) – Upper bound of the distribution.

  • mu (float) – Mean of the underlying normal distribution.

  • sigma (float, optional) – Standard deviation of the underlying normal distribution. 0.1 by default.

  • size (int, optional) – Number of samples to draw. 1 by default.

Returns:

If size equals 1 a single float is returned, otherwise an array of shape (size,) with the drawn samples.