Create an NDArrayView instance from a matrix.

arrayview_from_dense(np_array, device = NULL, read_only = FALSE,
  borrow = FALSE)

Arguments

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

matrix

matrix