randomgen.generator.ExtendedGenerator.complex_normal

ExtendedGenerator.complex_normal(loc=0.0, gamma=1.0, relation=0.0, size=None)

Draw random samples from a complex normal (Gaussian) distribution.

Parameters:
loc=0.0

Mean of the distribution.

gamma=1.0

Variance of the distribution

relation=0.0

Relation between the two component normals

size=None

Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single value is returned if loc, gamma and relation are all scalars. Otherwise, np.broadcast(loc, gamma, relation).size samples are drawn.

Returns:

out – Drawn samples from the parameterized complex normal distribution.

Return type:

numpy.ndarray or scalar

See also

numpy.random.Generator.normal

random values from a real-valued normal distribution

Notes

Complex normals are generated from a bivariate normal where the variance of the real component is 0.5 Re(gamma + relation), the variance of the imaginary component is 0.5 Re(gamma - relation), and the covariance between the two is 0.5 Im(relation). The implied covariance matrix must be positive semi-definite and so both variances must be zero and the covariance must be weakly smaller than the product of the two standard deviations.

References

Examples

Draw samples from the distribution:

>>> s = randomgen.generator.complex_normal(size=1000)