Skip to content

Commit 6f8eae3

Browse files
committed
cleanup
1 parent 929d87b commit 6f8eae3

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

pandas/core/internals/blocks.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,6 @@ def make_block_same_class(self, values, placement=None, ndim=None,
229229
"in a future release.", DeprecationWarning)
230230
if placement is None:
231231
placement = self.mgr_locs
232-
if isinstance(self, DatetimeTZBlock) and isinstance(values, np.ndarray):
233-
# FIXME:this doesnt belong here
234-
dtype = self.dtype
235232
return make_block(values, placement=placement, ndim=ndim,
236233
klass=self.__class__, dtype=dtype)
237234

@@ -2234,6 +2231,7 @@ class DatetimeTZBlock(ExtensionBlock, DatetimeBlock):
22342231

22352232
shape = Block.shape
22362233
_slice = Block._slice
2234+
iget = Block.iget
22372235

22382236
def where(self, other, cond, align=True, errors='raise',
22392237
try_cast=False, axis=0, transpose=False):
@@ -2293,14 +2291,6 @@ def is_view(self):
22932291
# check the ndarray values of the DatetimeIndex values
22942292
return self.values._data.base is not None
22952293

2296-
#def copy(self, deep=True):
2297-
# """ copy constructor """
2298-
# values = self.values
2299-
# if deep:
2300-
# values = values.copy(deep=True)
2301-
# return self.make_block_same_class(values, ndim=self.values.ndim)
2302-
# # TODO: now that ndim=self.ndim is added, this matches the base class
2303-
23042294
def get_values(self, dtype=None):
23052295
"""
23062296
Returns an ndarray of values.
@@ -2342,21 +2332,6 @@ def to_dense(self):
23422332
# expects that behavior.
23432333
return np.asarray(self.values, dtype=_NS_DTYPE)
23442334

2345-
def iget(self, col): # TODO: make sure this is... right
2346-
if self.ndim == 2 and is_integer(col):
2347-
# TOOD: make sure the col condition is right
2348-
return self.values.ravel()
2349-
elif (self.ndim == 2 and isinstance(col, tuple) and
2350-
len(col) == 2 and all(is_integer(entry) for entry in col)):
2351-
# kludge, need to get back to the base class version and not
2352-
# NonConsolidatableMixin version
2353-
return self.values[col]
2354-
elif (self.ndim == 2 and isinstance(col, tuple) and
2355-
len(col) == 2 and col[0] == slice(None) and is_integer(col[1])):
2356-
# kludge
2357-
return self.values[:, col[1]]
2358-
2359-
return super().iget(col)
23602335

23612336
def _try_coerce_args(self, values, other):
23622337
"""

0 commit comments

Comments
 (0)