Arrays

These functions are applicable for general ND-arrays.

Inner products

arr_vdot(x, y)

Returns the inner product of two arrays by flattening it

arr_rdot(x, y)

Returns the inner product Re(x^H, y) on two arrays by flattening them

Norms

arr_l1norm(x)

Returns the l1-norm of an array by flattening it

arr_l2norm(x)

Returns the l2-norm of an array by flattening it

arr_l2norm_sqr(x)

Returns the squared l2-norm of an array by flattening it

Utilities

hermitian(A)

Returns the Hermitian transpose of an array

arr_largest_index(x)

Returns the unraveled index of the largest entry (by magnitude) in an n-d array

arr2vec(x)

Converts an nd array to a vector

check_shapes_are_equal(array1, array2)

Raise an error if the shapes of the two arrays do not match.