dpnp.random.standard_cauchy

dpnp.random.standard_cauchy(size=None)[source]

Draw samples from a standard Cauchy distribution with mode = 0.

Also known as the Lorentz distribution.

Limitations

Output array data type is default float type.

Examples

Draw samples and plot the distribution:

>>> import matplotlib.pyplot as plt
>>> s = dpnp.random.standard_cauchy(1000000)
>>> s = s[(s>-25) & (s<25)]  # truncate distribution so it plots well
>>> plt.hist(s, bins=100)
>>> plt.show()