Skip to content

Commit 651d366

Browse files
jbrockmendelPingviinituutti
authored andcommitted
CLN: typo fixups (pandas-dev#25028)
1 parent 7abe82e commit 651d366

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

pandas/_libs/interval.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ cnp.import_array()
1818

1919

2020
cimport pandas._libs.util as util
21-
util.import_array()
2221

2322
from pandas._libs.hashtable cimport Int64Vector, Int64VectorData
2423

pandas/_libs/tslibs/nattype.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ class NaTType(_NaT):
382382
)
383383
combine = _make_error_func('combine', # noqa:E128
384384
"""
385-
Timsetamp.combine(date, time)
385+
Timestamp.combine(date, time)
386386
387387
date, time -> datetime with same date and time fields
388388
"""

pandas/_libs/tslibs/timestamps.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def round_nsint64(values, mode, freq):
197197

198198
# This is PITA. Because we inherit from datetime, which has very specific
199199
# construction requirements, we need to do object instantiation in python
200-
# (see Timestamp class above). This will serve as a C extension type that
200+
# (see Timestamp class below). This will serve as a C extension type that
201201
# shadows the python class, where we do any heavy lifting.
202202
cdef class _Timestamp(datetime):
203203

@@ -670,7 +670,7 @@ class Timestamp(_Timestamp):
670670
@classmethod
671671
def combine(cls, date, time):
672672
"""
673-
Timsetamp.combine(date, time)
673+
Timestamp.combine(date, time)
674674
675675
date, time -> datetime with same date and time fields
676676
"""

pandas/core/internals/blocks.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -2072,17 +2072,9 @@ def get_values(self, dtype=None):
20722072
return object dtype as boxed values, such as Timestamps/Timedelta
20732073
"""
20742074
if is_object_dtype(dtype):
2075-
values = self.values
2076-
2077-
if self.ndim > 1:
2078-
values = values.ravel()
2079-
2080-
values = lib.map_infer(values, self._box_func)
2081-
2082-
if self.ndim > 1:
2083-
values = values.reshape(self.values.shape)
2084-
2085-
return values
2075+
values = self.values.ravel()
2076+
result = self._holder(values).astype(object)
2077+
return result.reshape(self.values.shape)
20862078
return self.values
20872079

20882080

0 commit comments

Comments
 (0)