mlx_linalg (mlx v0.2.0)

View Source

Summary

Types

array/0

-type array() :: reference().

Functions

cholesky(A)

-spec cholesky(array()) -> {ok, array()} | {error, term()}.

condition_number(A)

-spec condition_number(array()) -> {ok, array()} | {error, term()}.

condition_number(A, P)

-spec condition_number(array(), atom() | number()) -> {ok, array()} | {error, term()}.

cross(A, B)

-spec cross(array(), array()) -> {ok, array()} | {error, term()}.

cross(A, B, Axis)

-spec cross(array(), array(), integer()) -> {ok, array()} | {error, term()}.

det(A)

-spec det(array()) -> {ok, array()} | {error, term()}.

diagonal(A)

-spec diagonal(array()) -> {ok, array()} | {error, term()}.

diagonal(A, Offset)

-spec diagonal(array(), integer()) -> {ok, array()} | {error, term()}.

dot(A, B)

-spec dot(array(), array()) -> {ok, array()} | {error, term()}.

eig(A)

-spec eig(array()) -> {ok, {array(), array()}} | {error, term()}.

eigh(A)

-spec eigh(array()) -> {ok, {array(), array()}} | {error, term()}.

eigvals(A)

-spec eigvals(array()) -> {ok, array()} | {error, term()}.

eigvalsh(A)

-spec eigvalsh(array()) -> {ok, array()} | {error, term()}.

inner(A, B)

-spec inner(array(), array()) -> {ok, array()} | {error, term()}.

inv(A)

-spec inv(array()) -> {ok, array()} | {error, term()}.

lstsq(A, B)

-spec lstsq(array(), array()) -> {ok, {array(), array(), integer(), array()}} | {error, term()}.

lu(A)

-spec lu(array()) -> {ok, {array(), array(), array()}} | {error, term()}.

lu(A, Permute)

-spec lu(array(), boolean()) -> {ok, {array(), array(), array()}} | {error, term()}.

matmul(A, B)

-spec matmul(array(), array()) -> {ok, array()} | {error, term()}.

matrix_power(A, N)

-spec matrix_power(array(), integer()) -> {ok, array()} | {error, term()}.

matrix_rank(A)

-spec matrix_rank(array()) -> {ok, array()} | {error, term()}.

matrix_rank(A, Tol)

-spec matrix_rank(array(), number()) -> {ok, array()} | {error, term()}.

norm(A)

-spec norm(array()) -> {ok, array()} | {error, term()}.

norm(A, Ord)

-spec norm(array(), atom() | number()) -> {ok, array()} | {error, term()}.

norm(A, Ord, Axis)

-spec norm(array(), atom() | number(), [integer()]) -> {ok, array()} | {error, term()}.

outer(A, B)

-spec outer(array(), array()) -> {ok, array()} | {error, term()}.

pinv(A)

-spec pinv(array()) -> {ok, array()} | {error, term()}.

pinv(A, Rcond)

-spec pinv(array(), number()) -> {ok, array()} | {error, term()}.

qr(A)

-spec qr(array()) -> {ok, {array(), array()}} | {error, term()}.

qr(A, Mode)

-spec qr(array(), atom()) -> {ok, {array(), array()}} | {error, term()}.

slogdet(A)

-spec slogdet(array()) -> {ok, {array(), array()}} | {error, term()}.

solve(A, B)

-spec solve(array(), array()) -> {ok, array()} | {error, term()}.

svd(A)

-spec svd(array()) -> {ok, {array(), array(), array()}} | {error, term()}.

svd(A, FullMatrices)

-spec svd(array(), boolean()) -> {ok, {array(), array(), array()}} | {error, term()}.

tensordot(A, B)

-spec tensordot(array(), array()) -> {ok, array()} | {error, term()}.

tensordot(A, B, Axes)

-spec tensordot(array(), array(), integer()) -> {ok, array()} | {error, term()}.

trace(A)

-spec trace(array()) -> {ok, array()} | {error, term()}.