Skip to content

Commit

Permalink
CLN: remove unnecessary alias (pandas-dev#32786)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored Mar 17, 2020
1 parent 05780a7 commit 138337b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,17 +825,15 @@ def as_array(self, transpose: bool = False) -> np.ndarray:
arr = np.empty(self.shape, dtype=float)
return arr.transpose() if transpose else arr

mgr = self

if self._is_single_block and mgr.blocks[0].is_datetimetz:
if self._is_single_block and self.blocks[0].is_datetimetz:
# TODO(Block.get_values): Make DatetimeTZBlock.get_values
# always be object dtype. Some callers seem to want the
# DatetimeArray (previously DTI)
arr = mgr.blocks[0].get_values(dtype=object)
arr = self.blocks[0].get_values(dtype=object)
elif self._is_single_block or not self.is_mixed_type:
arr = np.asarray(mgr.blocks[0].get_values())
arr = np.asarray(self.blocks[0].get_values())
else:
arr = mgr._interleave()
arr = self._interleave()

return arr.transpose() if transpose else arr

Expand Down

0 comments on commit 138337b

Please sign in to comment.