class_docstr: A stream that generates a rolling window of values from a stream.
  
  Parameters
  ----------
  window : int
      The size of the rolling window.
  min_periods : int, default 1
      The number of periods to wait before producing values from the aggregation
      function.
docstr: Computes a rolling variance from the underlying stream.
  
  Returns
  -------
  `Stream[float]`
      A rolling variance stream.
docstr_tok: ["Computes","a","rolling","variance","from","the","underlying","stream",".","Returns","--","--","--","-","`","Stream","[","float","]","`","A","rolling","variance","stream","."]
code: def var(self) -> "Stream[float]":
      """Computes a rolling variance from the underlying stream.
  
      Returns
      -------
      `Stream[float]`
          A rolling variance stream.
      """
  
      def func1(x):
          return np.nanvar(x, ddof=1)
  
      def func2(x):
          return np.var(x, ddof=1)
  
      func = func1 if self.min_periods < self.window else func2
      return self.agg(func).astype("float")
  
imports: from typing import List, Callable
  import numpy
  from tensortrade.feed.core.base import Stream
  from tensortrade.feed.api.float import Float
label_desc: Use image node_id 8 for calling the Rolling obj's underlying member method code with example usage: obj.var() and returns: self, np, np