Example #1
0
 def cov_func(x, y):
     x_array = self._prep_values(x)
     y_array = self._prep_values(y)
     window_indexer = self._get_window_indexer()
     min_periods = (self.min_periods if self.min_periods is not None
                    else window_indexer.window_size)
     start, end = window_indexer.get_window_bounds(
         num_values=len(x_array),
         min_periods=min_periods,
         center=self.center,
         closed=self.closed,
     )
     result = window_aggregations.ewmcov(
         x_array,
         start,
         end,
         # error: Argument 4 to "ewmcov" has incompatible type
         # "Optional[int]"; expected "int"
         self.min_periods,  # type: ignore[arg-type]
         y_array,
         self._com,
         self.adjust,
         self.ignore_na,
         bias,
     )
     return Series(result, index=x.index, name=x.name)
Example #2
0
 def cov_func(x, y):
     x_array = self._prep_values(x)
     y_array = self._prep_values(y)
     window_indexer = self._get_window_indexer()
     min_periods = (
         self.min_periods
         if self.min_periods is not None
         else window_indexer.window_size
     )
     start, end = window_indexer.get_window_bounds(
         num_values=len(x_array),
         min_periods=min_periods,
         center=self.center,
         closed=self.closed,
     )
     result = window_aggregations.ewmcov(
         x_array,
         start,
         end,
         self.min_periods,
         y_array,
         self.com,
         self.adjust,
         self.ignore_na,
         bias,
     )
     return Series(result, index=x.index, name=x.name)
Example #3
0
 def _cov(x, y):
     return window_aggregations.ewmcov(
         x,
         y,
         self.com,
         int(self.adjust),
         int(self.ignore_na),
         int(self.min_periods),
         1,
     )
Example #4
0
 def f(arg):
     return window_aggregations.ewmcov(
         arg,
         arg,
         self.com,
         int(self.adjust),
         int(self.ignore_na),
         int(self.min_periods),
         int(bias),
     )
Example #5
0
 def _cov(x, y):
     return window_aggregations.ewmcov(
         x,
         y,
         self.com,
         self.adjust,
         self.ignore_na,
         self.min_periods,
         1,
     )
Example #6
0
 def f(arg):
     return window_aggregations.ewmcov(
         arg,
         arg,
         self.com,
         self.adjust,
         self.ignore_na,
         self.min_periods,
         bias,
     )
Example #7
0
 def _cov(X, Y):
     return window_aggregations.ewmcov(
         X,
         start,
         end,
         min_periods,
         Y,
         self._com,
         self.adjust,
         self.ignore_na,
         True,
     )
Example #8
0
 def _cov(x, y):
     return window_aggregations.ewmcov(
         x,
         np.array([0], dtype=np.int64),
         np.array([0], dtype=np.int64),
         self.min_periods,
         y,
         self.com,
         self.adjust,
         self.ignore_na,
         1,
     )
Example #9
0
 def _get_cov(X, Y):
     X = self._shallow_copy(X)
     Y = self._shallow_copy(Y)
     cov = window_aggregations.ewmcov(
         X._prep_values(),
         Y._prep_values(),
         self.com,
         int(self.adjust),
         int(self.ignore_na),
         int(self.min_periods),
         int(bias),
     )
     return X._wrap_result(cov)
Example #10
0
 def _get_cov(X, Y):
     X = self._shallow_copy(X)
     Y = self._shallow_copy(Y)
     cov = window_aggregations.ewmcov(
         X._prep_values(),
         Y._prep_values(),
         self.com,
         self.adjust,
         self.ignore_na,
         self.min_periods,
         bias,
     )
     return wrap_result(X, cov)
Example #11
0
 def cov_func(x, y):
     x_array = self._prep_values(x)
     y_array = self._prep_values(y)
     result = window_aggregations.ewmcov(
         x_array,
         np.array([0], dtype=np.int64),
         np.array([0], dtype=np.int64),
         self.min_periods,
         y_array,
         self.com,
         self.adjust,
         self.ignore_na,
         bias,
     )
     return Series(result, index=x.index, name=x.name)