class_docstr: Computes running central moments.
  
  `RunningCentralMoments` will compute arbitrary central moments in
  streaming fashion following the formula proposed by Philippe Pebay
  (2008) [1]. For reference, the formula we refer to is the incremental
  version of arbitrary moments (equation 2.9). Since the algorithm computes
  moments as a function of lower ones, even if not requested, all lower
  moments will be computed as well. The moments that are actually returned
  is specified by the `moment` parameter at initialization. Note, while
  any arbitrarily high central moment is theoretically supported,
  `RunningCentralMoments` cannot guarantee numerical stability for all
  moments.
  
  #### References
  [1]: Philippe Pebay. Formulas for Robust, One-Pass Parallel Computation of
        Covariances and Arbitrary-Order Statistical Moments. _Technical Report
        SAND2008-6212_, 2008.
        https://prod-ng.sandia.gov/techlib-noauth/access-control.cgi/2008/086212.pdf
docstr: Returns an empty `RunningCentralMoments`.
  
  Args:
    shape: Python `Tuple` or `TensorShape` representing the shape of
      incoming samples.
    moment: Integer or iterable of integers that represent the
      desired moments to return.
    dtype: Dtype of incoming samples and the resulting statistics.
      By default, the dtype is `tf.float32`. Any integer dtypes will be
      cast to corresponding floats (i.e. `tf.int32` will be cast to
      `tf.float32`), as intermediate calculations should be performing
      floating-point division.
  
  Returns:
    state: `RunningCentralMoments` representing a stream of no
      inputs.
docstr_tok: ["Returns","an","empty","`","RunningCentralMoments","`",".","Args",":","shape",":","Python","`","Tuple","`","or","`","TensorShape","`","representing","the","shape","of","incoming","samples",".","moment",":","Integer","or","iterable","of","integers","that","represent","the","desired","moments","to","return",".","dtype",":","Dtype","of","incoming","samples","and","the","resulting","statistics",".","By","default",",","the","dtype","is","`","tf.float32","`",".","Any","integer","dtypes","will","be","cast","to","corresponding","floats","(","i.e",".","`","tf.int32","`","will","be","cast","to","`","tf.float32","`",")",",","as","intermediate","calculations","should","be","performing","floating-point","division",".","Returns",":","state",":","`","RunningCentralMoments","`","representing","a","stream","of","no","inputs","."]
code: def from_shape(cls, shape, moment, dtype=tf.float32):
      """Returns an empty `RunningCentralMoments`.
  
      Args:
        shape: Python `Tuple` or `TensorShape` representing the shape of
          incoming samples.
        moment: Integer or iterable of integers that represent the
          desired moments to return.
        dtype: Dtype of incoming samples and the resulting statistics.
          By default, the dtype is `tf.float32`. Any integer dtypes will be
          cast to corresponding floats (i.e. `tf.int32` will be cast to
          `tf.float32`), as intermediate calculations should be performing
          floating-point division.
  
      Returns:
        state: `RunningCentralMoments` representing a stream of no
          inputs.
      """
      if isinstance(moment, (tuple, list, np.ndarray)):
          # we want to support numpy arrays too, but must convert to a list to not
          # confuse `tf.nest.map_structure` in `finalize`
          desired_moments = list(moment)
          max_moment = max(desired_moments)
      else:
          desired_moments = [moment]
          max_moment = moment
      dtype = _float_dtype_like(dtype)
      return cls(
          mean_state=RunningMean.from_shape(shape, dtype),
          exponentiated_residuals=tf.zeros(
              ps.concat([(max_moment - 1,), shape], axis=0), dtype
          ),
          desired_moments=desired_moments,
      )
  
imports: import functools
  import math
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import nest_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.mcmc import diagnostic
  from tensorflow.python.util import nest
label_desc: Use image node_id 4 for calling the RunningCentralMoments obj's underlying member method code with example usage: obj.from_shape(cls, shape, moment, dtype) and returns: cls