Utilities

micarray.util.norm_of_columns(A, p=2)[source]

Vector p-norm of each column.

micarray.util.coherence_of_columns(A)[source]

Mutual coherence of columns of A.

micarray.util.asarray_1d(a, **kwargs)[source]

Squeeze the input and check if the result is one-dimensional.

Returns a converted to a numpy.ndarray and stripped of all singleton dimensions. Scalars are “upgraded” to 1D arrays. The result must have exactly one dimension. If not, an error is raised.