cupyx.scipy.sparse.eye_array#

cupyx.scipy.sparse.eye_array(m, n=None, *, k=0, dtype=<class 'float'>, format=None)[source]#

Creates a sparse array with ones on diagonal.

Parameters:
  • m (int) – Number of rows.

  • n (int or None) – Number of columns. Defaults to m.

  • k (int) – Diagonal to place ones on.

  • dtype – Type of array to create.

  • format (str or None) – Format of the result.

Returns:

cupyx.scipy.sparse.sparray