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 array.
  
  Args:
      np_array (numpy.ndarray): NumPy array
      device (:class:`~cntk.device.DeviceDescriptor`): device this value
       should be put on
      borrow (bool, default False): whether nd_array memory can be
       borrowed internally to speed up the data creation
      read_only (bool, optional): whether the data can be modified or
       not (default False)
  
  Returns:
      :class:`NDArrayView` instance
docstr_tok: ["Create","an",":","class",":","`","NDArrayView","`","instance","from","a","NumPy","array",".","Args",":","np_array","(","numpy.ndarray",")",":","NumPy","array","device","(",":","class",":","`","~cntk.device.DeviceDescriptor","`",")",":","device","this","value","should","be","put","on","borrow","(","bool",",","default","False",")",":","whether","nd_array","memory","can","be","borrowed","internally","to","speed","up","the","data","creation","read_only","(","bool",",","optional",")",":","whether","the","data","can","be","modified","or","not","(","default","False",")","Returns",":",":","class",":","`","NDArrayView","`","instance"]
code: def from_dense(np_array, device=None, read_only=False, borrow=False):
      """
      Create an :class:`NDArrayView` instance from a NumPy array.
  
      Args:
          np_array (numpy.ndarray): NumPy array
          device (:class:`~cntk.device.DeviceDescriptor`): device this value
           should be put on
          borrow (bool, default False): whether nd_array memory can be
           borrowed internally to speed up the data creation
          read_only (bool, optional): whether the data can be modified or
           not (default False)
  
      Returns:
          :class:`NDArrayView` instance
      """
      if not isinstance(np_array, np.ndarray):
          raise TypeError(
              "data must be of type numpy.ndarray"
              " and not %s" % type(np_array)
          )
  
      if not _is_c_contiguous(np_array):
          warnings.warn(
              "data is not C contiguous; rearrange your "
              "data/computation to avoid costly data conversions",
              RuntimeWarning,
          )
          np_array = np.ascontiguousarray(np_array)
          # You can not borrow a temporary array.
          borrow = False
  
      if device is None:
          device = use_default_device()
  
      return cntk_py.NDArrayView(np_array, device, read_only, borrow)
  
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 2 for calling the NDArrayView obj's underlying member method code with example usage: obj.from_dense(np_array, device, read_only, borrow) and returns: cntk_py