Skip to content

Commit 8d9b4fe

Browse files
jbrockmendelyeshsurya
authored andcommitted
PERF: NDArrayBackedExtensionArray in cython (pandas-dev#40840)
1 parent f8a01dd commit 8d9b4fe

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pandas/compat/pickle_compat.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
PeriodArray,
2222
TimedeltaArray,
2323
)
24-
from pandas.core.internals import BlockManager
2524

2625
if TYPE_CHECKING:
2726
from pandas import (
@@ -223,8 +222,7 @@ def load_newobj(self):
223222
elif issubclass(cls, TimedeltaArray) and not args:
224223
arr = np.array([], dtype="m8[ns]")
225224
obj = cls.__new__(cls, arr, arr.dtype)
226-
elif cls is BlockManager and not args:
227-
obj = cls.__new__(cls, (), [], False)
225+
228226
else:
229227
obj = cls.__new__(cls, *args)
230228

pandas/core/arrays/period.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ class PeriodArray(dtl.DatelikeOps):
178178
"days_in_month",
179179
"daysinmonth",
180180
]
181-
_datetimelike_ops: list[str] = _field_ops + _object_ops + _bool_ops
182-
_datetimelike_methods: list[str] = ["strftime", "to_timestamp", "asfreq"]
181+
_datetimelike_ops = _field_ops + _object_ops + _bool_ops
182+
_datetimelike_methods = ["strftime", "to_timestamp", "asfreq"]
183183

184184
# --------------------------------------------------------------------
185185
# Constructors

0 commit comments

Comments
 (0)