Skip to content

CLN/TYP: _libs #40765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert to troubleshoot
  • Loading branch information
jbrockmendel committed Apr 3, 2021
commit d49cddc23f6dcdf138951309bd02c794b359e36e
4 changes: 1 addition & 3 deletions pandas/_libs/internals.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,7 @@ cdef slice indexer_as_slice(intp_t[:] vals):

@cython.boundscheck(False)
@cython.wraparound(False)
def get_blkno_indexers(
int64_t[:] blknos, bint group=True
) -> list[tuple[int, slice | np.ndarray]]:
def get_blkno_indexers(int64_t[:] blknos, bint group=True):
"""
Enumerate contiguous runs of integers in ndarray.

Expand Down
6 changes: 3 additions & 3 deletions pandas/_libs/tslibs/fields.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def build_field_sarray(const int64_t[:] dtindex):
return out


def month_position_check(fields, weekdays) -> str | None:
def month_position_check(fields, weekdays):
cdef:
int32_t daysinmonth, y, m, d
bint calendar_end = True
Expand Down Expand Up @@ -198,7 +198,7 @@ cdef inline bint _is_on_month(int month, int compare_month, int modby) nogil:
@cython.wraparound(False)
@cython.boundscheck(False)
def get_start_end_field(const int64_t[:] dtindex, str field,
str freqstr=None, int month_kw=12):
object freqstr=None, int month_kw=12):
"""
Given an int64-based datetime index return array of indicators
of whether timestamps are at the start/end of the month/quarter/year
Expand Down Expand Up @@ -755,7 +755,7 @@ cdef inline ndarray[int64_t] _roundup_int64(values, int64_t unit):
return _floor_int64(values + unit // 2, unit)


def round_nsint64(values: np.ndarray, mode: RoundTo, nanos: int) -> np.ndarray:
def round_nsint64(values: np.ndarray, mode: RoundTo, nanos) -> np.ndarray:
"""
Applies rounding mode at given frequency

Expand Down