cyjax.random.uniform_angle#

cyjax.random.uniform_angle(key, shape, minrad=0, maxrad=1)#

Complex values individually uniform on complex disk.

Radius of complex valuse lie between minrad (default 0, corresponding to a disk) and maxrad.

Example

>>> x = uniform_angle(jax.random.PRNGKey(0), (4,))
>>> jnp.all(jnp.abs(x) < 1)
DeviceArray(True, dtype=bool)
Parameters:
  • key (Union[PRNGKeyArray, Array]) – PRNG random key.

  • shape (Sequence[Union[int, Any]]) – Tuple of nonnegative integers.

  • minrad (Union[float, int]) – Minimal absolute value of generated values.

  • maxrad (Union[float, int]) – Maximal absolute value of generated values.

Return type:

Union[Array, ndarray, bool_, number]

Returns:

Array of requested shape containing complex values.