ndarray
cupy.ufunc
cupy.fft
cupy.linalg
cupy.random
cupy.testing
cupyx.scipy.fft
cupyx.scipy.fftpack
cupyx.scipy.linalg
cupyx.scipy.ndimage
cupyx.scipy.sparse
cupyx.scipy.special
cupyx.scipy.signal
cupyx.scipy.stats
Creates a sparse matrix with ones on diagonal.
m (int) – Number of rows.
n (int or None) – Number of columns. If it is None, it makes a square matrix.
None
k (int) – Diagonal to place ones on.
dtype – Type of a matrix to create.
format (str or None) – Format of the result, e.g. format="csr".
format="csr"
Created sparse matrix.
cupyx.scipy.sparse.spmatrix
See also
scipy.sparse.eye()