Skip to content

Commit

Permalink
PERF: NDArrayBackedExtensionArray in cython (pandas-dev#40840)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored and yeshsurya committed May 6, 2021
1 parent f8a01dd commit 8d9b4fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions pandas/compat/pickle_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
PeriodArray,
TimedeltaArray,
)
from pandas.core.internals import BlockManager

if TYPE_CHECKING:
from pandas import (
Expand Down Expand Up @@ -223,8 +222,7 @@ def load_newobj(self):
elif issubclass(cls, TimedeltaArray) and not args:
arr = np.array([], dtype="m8[ns]")
obj = cls.__new__(cls, arr, arr.dtype)
elif cls is BlockManager and not args:
obj = cls.__new__(cls, (), [], False)

else:
obj = cls.__new__(cls, *args)

Expand Down
4 changes: 2 additions & 2 deletions pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ class PeriodArray(dtl.DatelikeOps):
"days_in_month",
"daysinmonth",
]
_datetimelike_ops: list[str] = _field_ops + _object_ops + _bool_ops
_datetimelike_methods: list[str] = ["strftime", "to_timestamp", "asfreq"]
_datetimelike_ops = _field_ops + _object_ops + _bool_ops
_datetimelike_methods = ["strftime", "to_timestamp", "asfreq"]

# --------------------------------------------------------------------
# Constructors
Expand Down

0 comments on commit 8d9b4fe

Please sign in to comment.