class_docstr: Stack the input data samples to construct the batch.
  The N input samples must have the same shape/length and will be stacked to construct a batch.
  Examples
  --------
  >>> from mxnet.gluon.data import batchify
  >>> # Stack multiple lists
  >>> a = [1, 2, 3, 4]
  >>> b = [4, 5, 6, 8]
  >>> c = [8, 9, 1, 2]
  >>> batchify.Stack()([a, b, c])
  [[1. 2. 3. 4.]
   [4. 5. 6. 8.]
   [8. 9. 1. 2.]]
  <NDArray 3x4 @cpu(0)>
  >>> # Stack multiple numpy.ndarrays
  >>> import numpy as np
  >>> a = np.array([[1, 2, 3, 4], [5, 6, 7, 8]])
  >>> b = np.array([[5, 6, 7, 8], [1, 2, 3, 4]])
  >>> batchify.Stack()([a, b])
  [[[1. 2. 3. 4.]
    [5. 6. 7. 8.]]
   [[5. 6. 7. 8.]
    [1. 2. 3. 4.]]]
  <NDArray 2x2x4 @cpu(0)>
  >>> # Stack multiple NDArrays
  >>> import mxnet as mx
  >>> a = nd.array([[1, 2, 3, 4], [5, 6, 7, 8]])
  >>> b = nd.array([[5, 6, 7, 8], [1, 2, 3, 4]])
  >>> batchify.Stack()([a, b])
  [[[1. 2. 3. 4.]
    [5. 6. 7. 8.]]
   [[5. 6. 7. 8.]
    [1. 2. 3. 4.]]]
  <NDArray 2x2x4 @cpu(0)>
docstr: Batchify the input data
  Parameters
  ----------
  data : list
      The input data samples
  Returns
  -------
  batch_data : NDArray
docstr_tok: ["Batchify","the","input","data","Parameters","--","--","--","--","--","data",":","list","The","input","data","samples","Returns","--","--","--","-","batch_data",":","NDArray"]
code: def __call__(self, data):
      """Batchify the input data
      Parameters
      ----------
      data : list
          The input data samples
      Returns
      -------
      batch_data : NDArray
      """
      _arr = _np if is_np_array() else nd
      _arr_cls = _arr.ndarray if is_np_array() else _arr.NDArray
      if isinstance(data[0], _arr_cls):
          dtype = data[0].dtype
          if self._use_shared_mem:
              out = _arr.empty(
                  (len(data),) + data[0].shape,
                  dtype=dtype,
                  ctx=Device("cpu_shared", 0),
              )
              return (
                  _arr.stack(data, out=out)
                  if is_np_array()
                  else _arr.stack(*data, out=out)
              )
          else:
              return (
                  _arr.stack(data)
                  if is_np_array()
                  else _arr.stack(*data)
              )
      elif isinstance(data[0], (tuple, list)):
          data = zip(*data)
          return [self.__call__(i) for i in data]
      else:
          out = np.asarray(data)
          dtype = out.dtype
          if self._use_shared_mem:
              return _arr.array(
                  out, ctx=Device("cpu_shared", 0), dtype=dtype
              )
          else:
              return _arr.array(out, dtype=dtype)
  
imports: import math
  import warnings
  import numpy
  from ...device import Device, cpu
  from ...None import ndarray
  from ...None import numpy
  from ...util import is_np_array
label_desc: Use image node_id 2 for calling the Stack obj's underlying member method code with example usage: obj.__call__(data) and returns: unknown, unknown, unknown, _arr, _arr