snnib.simulations.brian2_simulation.truncnorm

snnib.simulations.brian2_simulation.truncnorm(mu: float = 0, sigma: float = 1, xmin: float = None, xmax: float = None, size: tuple = 1) ndarray[source]

returns samples from truncated normal distribution

  • function to generate samples from a truncated normal distribution

Parameters
  • mu
    • float, optional

    • mean

    • the default is 0

  • sigma
    • float, optional

    • standard deviation

    • the default is 1

  • xmin
    • float, optional

    • lower truncation bound

    • the default is None
      • no truncation

  • xmax
    • float, optional

    • upper truncation bound

    • the default is None
      • no truncation

  • size
    • tuple, optional

    • shape of the array to generate

    • the default is 1

  • ‘verbose’
    • int, optional

    • verbosity level

    • the default is 0

Returns
  • out
    • np.ndarray

    • samples drawn from a truncated normal distribution

Dependencies
  • numpy