ffsim.random.random_orthogonal

ffsim.random.random_orthogonal(dim, *, seed=None, dtype=<class 'float'>)[source]

Return a random orthogonal matrix distributed with Haar measure.

Parameters:
  • dim (int) – The width and height of the matrix.

  • seed – A seed to initialize the pseudorandom number generator. Should be a valid input to np.random.default_rng.

  • dtype – The data type to use for the result.

Return type:

ndarray

Returns:

The sampled orthogonal matrix.

References