BinomialFunction class
(Shortest import: from brian2 import BinomialFunction)
- class brian2.input.binomial.BinomialFunction(n, p, approximate=True, name='_binomial*')[source]
-
A function that generates samples from a binomial distribution.
- Parameters:
n : int
Number of samples
p : float
Probablility
approximate : bool, optional
Whether to approximate the binomial with a normal distribution if \(n p > 5 \wedge n (1 - p) > 5\). Defaults to
True
.
Attributes
Container for implementing functions for different targets This container can be extended by other codegeneration targets/devices The key has to be the name of the target, the value a function that takes three parameters (n, p, use_normal) and returns a tuple of (code, dependencies)
Details
- implementations
Container for implementing functions for different targets This container can be extended by other codegeneration targets/devices The key has to be the name of the target, the value a function that takes three parameters (n, p, use_normal) and returns a tuple of (code, dependencies)