cyjax.random.uniform_angle_unit#

cyjax.random.uniform_angle_unit(key, shape)#

Complex values with unit modulus and uniform angle.

Example

>>> x = uniform_angle_unit(jax.random.PRNGKey(0), (4,))
>>> jnp.allclose(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.

Returns:

Array of requested shape containing complex values.