cr.sparse.dict.random_orthonormal_rows

cr.sparse.dict.random_orthonormal_rows(key, M, N)[source]

Generates a random sensing matrix with orthonormal rows

Parameters
  • key – a PRNG key used as the random key.

  • M (int) – Number of rows of the sensing matrix

  • N (int) – Number of columns of the sensing matrix

Returns

A random matrix of shape (M, N) with orthonormal rows

Return type

(jax.numpy.ndarray)

Example

>>> from jax import random
>>> import cr.sparse as crs
>>> import cr.sparse.dict
>>> Phi = cr.sparse.dict.random_orthonormal_rows(random.PRNGKey(0),2, 4)
>>> print(Phi)
[[-0.107175 -0.373504 -0.422407 -0.81889 ]
[-0.769728 -0.300913  0.560666 -0.051218]]