From b563b05c3823cfec79570880ea7d8c5cc1c41b32 Mon Sep 17 00:00:00 2001 From: abonte <6319051+abonte@users.noreply.github.com> Date: Tue, 10 Jan 2023 19:00:19 +0100 Subject: [PATCH 1/2] add parameter in docstring, remove unused parameter --- pandas/core/indexes/timedeltas.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pandas/core/indexes/timedeltas.py b/pandas/core/indexes/timedeltas.py index 54a9152670cab..c8d55af885be2 100644 --- a/pandas/core/indexes/timedeltas.py +++ b/pandas/core/indexes/timedeltas.py @@ -65,6 +65,14 @@ class TimedeltaIndex(DatetimeTimedeltaMixin): Make a copy of input ndarray. name : object Name to be stored in the index. + dtype : numpy.dtype + Currently, only ``numpy.dtype("timedelta64[ns]")`` is accepted. + + .. warning:: + + A future version of pandas will change dtype to be an instance + of an ``ExtensionDtype`` subclass, not a ``numpy.dtype``. + See :class:`pandas.arrays.TimedeltaArray`. Attributes ---------- @@ -120,7 +128,6 @@ def __new__( data=None, unit=None, freq=lib.no_default, - closed=None, dtype=None, copy: bool = False, name=None, From 46ed049459a9a216f29c87d70b85cd168cf832c9 Mon Sep 17 00:00:00 2001 From: abonte <6319051+abonte@users.noreply.github.com> Date: Tue, 10 Jan 2023 19:01:48 +0100 Subject: [PATCH 2/2] fix indentation --- pandas/core/indexes/timedeltas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/indexes/timedeltas.py b/pandas/core/indexes/timedeltas.py index c8d55af885be2..3cd50cbc069af 100644 --- a/pandas/core/indexes/timedeltas.py +++ b/pandas/core/indexes/timedeltas.py @@ -66,7 +66,7 @@ class TimedeltaIndex(DatetimeTimedeltaMixin): name : object Name to be stored in the index. dtype : numpy.dtype - Currently, only ``numpy.dtype("timedelta64[ns]")`` is accepted. + Currently, only ``numpy.dtype("timedelta64[ns]")`` is accepted. .. warning::