orthogonal

Contents

orthogonal#

class brainstate.random.orthogonal(n, size=None, key=None, dtype=None)#

Sample uniformly from the orthogonal group O(n).

Parameters:
  • n (int) – An integer indicating the resulting dimension.

  • size (int | Sequence[int] | integer | Sequence[integer] | None) – The batch dimensions of the result.

  • key (int | Array | ndarray | None) – The key for the random number generator. If not given, the default random number generator is used.

Returns:

out – The sampled results.

Return type:

Array