class_docstr: Tracks values for numerically stable mean and covariance calculation.
class_docstr_tok: ["Tracks","values","for","numerically","stable","mean","and","covariance","calculation","."]
docstr: Updates a MeanCovAccumulator with a batch of values.
  
  Args:
    array: An ndarray with numeric type.
docstr_tok: ["Updates","a","MeanCovAccumulator","with","a","batch","of","values",".","Args",":","array",":","An","ndarray","with","numeric","type","."]
code: def update(self, array: np.ndarray):
      """Updates a MeanCovAccumulator with a batch of values.
  
      Args:
        array: An ndarray with numeric type.
      """
      count = len(array)
      if count == 0:
          return
      elif count == 1:
          dim = array[0].size
          covariance = np.zeros((dim, dim), dtype=np.float64)
      else:
          covariance = np.cov(array, rowvar=False)
      mean = np.mean(array, axis=0)
      self._combine(count, mean, covariance)
  
imports: from typing import Optional
  import numpy
label_desc: Use image node_id 2 for calling the MeanCovAccumulator obj's underlying member method code with example usage: obj.update(array) without return types