Linear algebra (cupyx.scipy.linalg)


solve_triangular(a, b[, trans, lower, …])

Solve the equation a x = b for x, assuming a is a triangular matrix.

tril(m[, k])

Make a copy of a matrix with elements above the k-th diagonal zeroed.

triu(m[, k])

Make a copy of a matrix with elements below the k-th diagonal zeroed.


lu(a[, permute_l, overwrite_a, check_finite])

LU decomposition.

lu_factor(a[, overwrite_a, check_finite])

LU decomposition.

lu_solve(lu_and_piv, b[, trans, …])

Solve an equation system, a * x = b, given the LU factorization of a

Special Matrices


Create a block diagonal matrix from provided arrays.


Construct a circulant matrix.


Create a companion matrix.

convolution_matrix(a, n[, mode])

Construct a convolution matrix.

dft(n[, scale])

Discrete Fourier transform matrix.


Returns a symmetric Fiedler matrix


Returns a Fiedler companion matrix

hadamard(n[, dtype])

Construct an Hadamard matrix.

hankel(c[, r])

Construct a Hankel matrix.

helmert(n[, full])

Create an Helmert matrix of order n.


Create a Hilbert matrix of order n.

kron(a, b)

Kronecker product.

leslie(f, s)

Create a Leslie matrix.

toeplitz(c[, r])

Construct a Toeplitz matrix.

tri(N[, M, k, dtype])

Construct (N, M) matrix filled with ones at and below the k-th diagonal.