class_docstr: Internal representation of minibatch data.
  
  Args:
      batch: batch input for `var`.
       It can be:
  
        * a pure Python structure (list of lists, ...),
        * a list of NumPy arrays or SciPy sparse CSR matrices
        * a :class:`~cntk.core.Value` object (e.g. returned by :func:`one_hot`)
      seq_starts (list of `bool`\ s or None): if None, every sequence is
       treated as a new sequence. Otherwise, it is interpreted as a list of
       Booleans that tell whether a sequence is a new sequence (`True`) or a
       continuation of the sequence in the same slot of the previous
       minibatch (`False`)
      device (:class:`~cntk.device.DeviceDescriptor`): device this value
       should be put on
class_docstr_tok: ["Internal","representation","of","minibatch","data",".","Args",":","batch",":","batch","input","for","`","var","`",".","It","can","be",":","*","a","pure","Python","structure","(","list","of","lists",",","...",")",",","*","a","list","of","NumPy","arrays","or","SciPy","sparse","CSR","matrices","*","a",":","class",":","`","~cntk.core.Value","`","object","(","e.g",".","returned","by",":","func",":","`","one_hot","`",")","seq_starts","(","list","of","`","bool","`","\\","s","or","None",")",":","if","None",",","every","sequence","is","treated","as","a","new","sequence",".","Otherwise",",","it","is","interpreted","as","a","list","of","Booleans","that","tell","whether","a","sequence","is","a","new","sequence","(","`","True","`",")","or","a","continuation","of","the","sequence","in","the","same","slot","of","the","previous","minibatch","(","`","False","`",")","device","(",":","class",":","`","~cntk.device.DeviceDescriptor","`",")",":","device","this","value","should","be","put","on"]
docstr: Convert a Value to a sequence of NumPy arrays that have their masked
  entries removed.
  
  Returns:
      If variable contains more dynamic axes than the batch axis, a list
      of NumPy arrays (if dense) or a SciPy CSR array (if sparse) will be
      returned. Otherwise, the arrays will be returned directly.
docstr_tok: ["Convert","a","Value","to","a","sequence","of","NumPy","arrays","that","have","their","masked","entries","removed",".","Returns",":","If","variable","contains","more","dynamic","axes","than","the","batch","axis",",","a","list","of","NumPy","arrays","(","if","dense",")","or","a","SciPy","CSR","array","(","if","sparse",")","will","be","returned",".","Otherwise",",","the","arrays","will","be","returned","directly","."]
code: def as_sequences(self, variable=None):
      """
      Convert a Value to a sequence of NumPy arrays that have their masked
      entries removed.
  
      Returns:
          If variable contains more dynamic axes than the batch axis, a list
          of NumPy arrays (if dense) or a SciPy CSR array (if sparse) will be
          returned. Otherwise, the arrays will be returned directly.
      """
      if self.is_sparse:
          if variable is None:
              raise ValueError(
                  "cannot convert sparse value to sequences "
                  "without the corresponding variable"
              )
          network = _sparse_to_dense_network_cache(
              variable.shape, True, self.device
          )
  
          warnings.warn(
              "converting Value object to CSR format might be slow"
          )
  
          # TODO: Add direct conversion, since creating an intermediate array might be slow
          dense_data = network.eval(self, device=self.device)
          return [sparse.csr_matrix(seq) for seq in dense_data]
  
      else:
          # Checking for mask without retrieving
          has_mask = super(Value, self).mask() is not None
  
          if has_mask:
              if variable is None:
                  mask = self.mask
                  return [
                      seq[mask[idx] != cntk_py.MaskKind_Invalid]
                      for idx, seq in enumerate(self.data.asarray())
                  ]
              else:
                  value_sequences = self.unpack_variable_value(
                      variable, True, cpu()
                  )
                  return [seq.asarray() for seq in value_sequences[0]]
          else:
              # This might be costly, but we need to return a list for
              # consistency.
              arr = self.asarray()
              if not arr.shape:
                  return [arr]
              else:
                  return list(arr)
  
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 Value obj's underlying member method code with example usage: obj.as_sequences(variable) and returns: unknown, unknown, unknown, list, list