Create an NDArrayView instance from a sparse matrix in CSR format.

arrayview_from_data(data, device = NULL, read_only = FALSE,
  borrow = FALSE)

Arguments

data

matrix to be converted

device

instance of DeviceDescriptor

read_only

(bool) whether the data can be modified

borrow

(bool) whether nd_array memory can be borrowed internally to speed up data creation