wecopttool.waves.random_phase

random_phase(shape=None, seed=None)[source]

Generate random phases in range [-π, π) radians.

Parameters:
  • shape (Iterable[int] | int | None) – Shape of the output array of random phases.

  • seed (float | None) – Seed for random number generator. Used for reproducibility. Generally should not be used except for testing.

Return type:

float | ndarray