Create an array of zeros with shape (length, shape(obj)), where
        obj is the internal PyMC Stochastic or Deterministic.

def _initialize(self, chain, length):
        """Create an array of zeros with shape (length, shape(obj)), where
        obj is the internal PyMC Stochastic or Deterministic.
        """
        # If this db was loaded from the disk, it may not have its
        # tallied step methods' getfuncs yet.
        if self._getfunc is None:
            self._getfunc = self.db.model._funs_to_tally[self.name]

        # First, see if the object has an explicit dtype.
        value = np.array(self._getfunc())

        if value.dtype is object:
            self._trace[chain] = zeros(length, dtype=object)

        elif value.dtype is not None:
            self._trace[chain] = zeros((length,) + shape(value), value.dtype)

        # Otherwise, if it's an array, read off its value's dtype.
        elif isinstance(value, ndarray):
            self._trace[chain] = zeros((length,) + shape(value), value.dtype)

        # Otherwise, let numpy type its value. If the value is a scalar, the trace will be of the
        # corresponding type. Otherwise it'll be an object array.
        else:
            self._trace[chain] = zeros(
                (length,
                 ) + shape(value),
                dtype=value.__class__)

        self._index[chain] = 0