|
54 | 54 | cache_readonly, |
55 | 55 | doc, |
56 | 56 | ) |
57 | | -from pandas.util._exceptions import find_stack_level |
58 | 57 |
|
59 | 58 | from pandas.core.dtypes.common import ( |
60 | 59 | ensure_object, |
@@ -135,11 +134,6 @@ class PeriodArray(dtl.DatelikeOps, libperiod.PeriodMixin): # type: ignore[misc] |
135 | 134 | dtype : PeriodDtype, optional |
136 | 135 | A PeriodDtype instance from which to extract a `freq`. If both |
137 | 136 | `freq` and `dtype` are specified, then the frequencies must match. |
138 | | - freq : str or DateOffset |
139 | | - The `freq` to use for the array. Mostly applicable when `values` |
140 | | - is an ndarray of integers, when `freq` is required. When `values` |
141 | | - is a PeriodArray (or box around), it's checked that ``values.freq`` |
142 | | - matches `freq`. |
143 | 137 | copy : bool, default False |
144 | 138 | Whether to copy the ordinals before storing. |
145 | 139 |
|
@@ -224,20 +218,7 @@ def _scalar_type(self) -> type[Period]: |
224 | 218 | # -------------------------------------------------------------------- |
225 | 219 | # Constructors |
226 | 220 |
|
227 | | - def __init__( |
228 | | - self, values, dtype: Dtype | None = None, freq=None, copy: bool = False |
229 | | - ) -> None: |
230 | | - if freq is not None: |
231 | | - # GH#52462 |
232 | | - warnings.warn( |
233 | | - "The 'freq' keyword in the PeriodArray constructor is deprecated " |
234 | | - "and will be removed in a future version. Pass 'dtype' instead", |
235 | | - FutureWarning, |
236 | | - stacklevel=find_stack_level(), |
237 | | - ) |
238 | | - freq = validate_dtype_freq(dtype, freq) |
239 | | - dtype = PeriodDtype(freq) |
240 | | - |
| 221 | + def __init__(self, values, dtype: Dtype | None = None, copy: bool = False) -> None: |
241 | 222 | if dtype is not None: |
242 | 223 | dtype = pandas_dtype(dtype) |
243 | 224 | if not isinstance(dtype, PeriodDtype): |
|
0 commit comments