class_docstr: Creates an empty dense internal data representation of a
  :class:`~cntk.core.Value` object.
  To create an NDArrayView from a NumPy array, use :meth:`from_dense`.
  To create an NDArrayView from a sparse array, use :meth:`from_csr`.
  
  Args:
      shape (tuple): shape of the data
      data_type (np.float32, np.float64, np.float16): data type of the data
      device (:class:`~cntk.device.DeviceDescriptor`): device this value
       should be put on
class_docstr_tok: ["Creates","an","empty","dense","internal","data","representation","of","a",":","class",":","`","~cntk.core.Value","`","object",".","To","create","an","NDArrayView","from","a","NumPy","array",",","use",":","meth",":","`","from_dense","`",".","To","create","an","NDArrayView","from","a","sparse","array",",","use",":","meth",":","`","from_csr","`",".","Args",":","shape","(","tuple",")",":","shape","of","the","data","data_type","(","np.float32",",","np.float64",",","np.float16",")",":","data","type","of","the","data","device","(",":","class",":","`","~cntk.device.DeviceDescriptor","`",")",":","device","this","value","should","be","put","on"]
docstr: Create an :class:`NDArrayView` instance from a NumPy or SciPy sparse
  array in CSR format.
  
  Args:
      data (numpy.ndarray or scipy.sparse.csr_matrix): data
      device (:class:`~cntk.device.DeviceDescriptor`): device this value
       should be put on
      read_only (bool, optional): whether the data can be modified or
       not (default False)
      borrow (bool, default False): whether nd_array memory can be
       borrowed internally to speed up the data creation
  
  Returns:
      :class:`NDArrayView` instance
docstr_tok: ["Create","an",":","class",":","`","NDArrayView","`","instance","from","a","NumPy","or","SciPy","sparse","array","in","CSR","format",".","Args",":","data","(","numpy.ndarray","or","scipy.sparse.csr_matrix",")",":","data","device","(",":","class",":","`","~cntk.device.DeviceDescriptor","`",")",":","device","this","value","should","be","put","on","read_only","(","bool",",","optional",")",":","whether","the","data","can","be","modified","or","not","(","default","False",")","borrow","(","bool",",","default","False",")",":","whether","nd_array","memory","can","be","borrowed","internally","to","speed","up","the","data","creation","Returns",":",":","class",":","`","NDArrayView","`","instance"]
code: def from_data(data, device=None, read_only=False, borrow=False):
      """
      Create an :class:`NDArrayView` instance from a NumPy or SciPy sparse
      array in CSR format.
  
      Args:
          data (numpy.ndarray or scipy.sparse.csr_matrix): data
          device (:class:`~cntk.device.DeviceDescriptor`): device this value
           should be put on
          read_only (bool, optional): whether the data can be modified or
           not (default False)
          borrow (bool, default False): whether nd_array memory can be
           borrowed internally to speed up the data creation
  
      Returns:
          :class:`NDArrayView` instance
      """
      if isinstance(data, cntk_py.NDArrayView):
          return data
  
      if isinstance(data, np.number):
          data = np.asarray(data)
  
      if isinstance(data, np.ndarray):
          ndav = NDArrayView.from_dense(data, device, borrow=borrow)
      elif sparse.issparse(data):
          ndav = NDArrayView.from_csr(data, device, borrow=borrow)
      else:
          raise TypeError(
              'data type "%s" is not supported. Please '
              "provide the data as a Python list of NumPy "
              "arrays or Scipy CSR matrices." % type(data)
          )
  
      return ndav
  
imports: import warnings
  import numbers
  import numpy
  from scipy import sparse
  from .None import cntk_py
  from .device import use_default_device, cpu, DeviceKind
  from cntk.internal import typemap
  from cntk.internal.sanitize import sanitize_batch, _sparse_to_dense_network_cache, data_type_to_dtype
label_desc: Use image node_id 4 for calling the NDArrayView obj's underlying member method code with example usage: obj.from_data(data, device, read_only, borrow) and returns: ndav, data