class_docstr: Tracks quantities for numerically stable mean and variance calculation.
class_docstr_tok: ["Tracks","quantities","for","numerically","stable","mean","and","variance","calculation","."]
docstr: Updates a MeanVarAccumulator with a batch of values.
  
  Args:
    array: An ndarray with numeric type.
  
  Raises:
    ValueError: If called on a weighted accumulator.
docstr_tok: ["Updates","a","MeanVarAccumulator","with","a","batch","of","values",".","Args",":","array",":","An","ndarray","with","numeric","type",".","Raises",":","ValueError",":","If","called","on","a","weighted","accumulator","."]
code: def update(self, array: np.ndarray):
      """Updates a MeanVarAccumulator with a batch of values.
  
      Args:
        array: An ndarray with numeric type.
  
      Raises:
        ValueError: If called on a weighted accumulator.
      """
      array = array.astype(np.float64)
      count = array.size
      if count == 0:
          return
      mean = np.mean(array)
      variance = np.var(array)
      self._combine(count, mean, variance)
  
imports: from typing import Optional
  import numpy
label_desc: Use image node_id 2 for calling the MeanVarAccumulator obj's underlying member method code with example usage: obj.update(array) without return types