|
48 | 48 | calculate_center_offset,
|
49 | 49 | calculate_min_periods,
|
50 | 50 | get_weighted_roll_func,
|
51 |
| - validate_baseindexer_support, |
52 | 51 | zsqrt,
|
53 | 52 | )
|
54 | 53 | from pandas.core.window.indexers import (
|
@@ -393,12 +392,11 @@ def _get_cython_func_type(self, func: str) -> Callable:
|
393 | 392 | return self._get_roll_func(f"{func}_variable")
|
394 | 393 | return partial(self._get_roll_func(f"{func}_fixed"), win=self._get_window())
|
395 | 394 |
|
396 |
| - def _get_window_indexer(self, window: int, func_name: Optional[str]) -> BaseIndexer: |
| 395 | + def _get_window_indexer(self, window: int) -> BaseIndexer: |
397 | 396 | """
|
398 | 397 | Return an indexer class that will compute the window start and end bounds
|
399 | 398 | """
|
400 | 399 | if isinstance(self.window, BaseIndexer):
|
401 |
| - validate_baseindexer_support(func_name) |
402 | 400 | return self.window
|
403 | 401 | if self.is_freq_type:
|
404 | 402 | return VariableWindowIndexer(index_array=self._on.asi8, window_size=window)
|
@@ -444,7 +442,7 @@ def _apply(
|
444 | 442 |
|
445 | 443 | blocks, obj = self._create_blocks()
|
446 | 444 | block_list = list(blocks)
|
447 |
| - window_indexer = self._get_window_indexer(window, name) |
| 445 | + window_indexer = self._get_window_indexer(window) |
448 | 446 |
|
449 | 447 | results = []
|
450 | 448 | exclude: List[Scalar] = []
|
@@ -1632,9 +1630,6 @@ def quantile(self, quantile, interpolation="linear", **kwargs):
|
1632 | 1630 | """
|
1633 | 1631 |
|
1634 | 1632 | def cov(self, other=None, pairwise=None, ddof=1, **kwargs):
|
1635 |
| - if isinstance(self.window, BaseIndexer): |
1636 |
| - validate_baseindexer_support("cov") |
1637 |
| - |
1638 | 1633 | if other is None:
|
1639 | 1634 | other = self._selected_obj
|
1640 | 1635 | # only default unset
|
@@ -1781,9 +1776,6 @@ def _get_cov(X, Y):
|
1781 | 1776 | )
|
1782 | 1777 |
|
1783 | 1778 | def corr(self, other=None, pairwise=None, **kwargs):
|
1784 |
| - if isinstance(self.window, BaseIndexer): |
1785 |
| - validate_baseindexer_support("corr") |
1786 |
| - |
1787 | 1779 | if other is None:
|
1788 | 1780 | other = self._selected_obj
|
1789 | 1781 | # only default unset
|
|
0 commit comments