Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lithomas1 committed Aug 10, 2023
1 parent 08b97d9 commit c80d84a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 5 additions & 3 deletions pandas/_libs/algos.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1371,16 +1371,18 @@ ctypedef fused out_t:
@cython.boundscheck(False)
@cython.wraparound(False)
def diff_2d(
# TODO: cython bug (post Cython 3) preventsupdate to "const diff_t[:, :] arr"
diff_t[:, :] arr,
# TODO: cython bug (post Cython 3) prevents update to "const diff_t[:, :] arr"
ndarray[diff_t, ndim=2] arr,
out_t[:, :] out,
Py_ssize_t periods,
int axis,
bint datetimelike=False,
):
cdef:
Py_ssize_t i, j, sx, sy, start, stop
bint f_contig = arr.is_f_contig()
bint f_contig = arr.flags.f_contiguous
# TODO: change to this when arr becomes a memoryview
# bint f_contig = arr.is_f_contig()
diff_t left, right

# Disable for unsupported dtype combinations,
Expand Down
7 changes: 6 additions & 1 deletion pandas/_libs/groupby.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,12 @@ def group_nth(
if uses_mask:
isna_entry = mask[i, j]
else:
isna_entry = _treat_as_na(val, is_datetimelike)
# TODO: just make _treat_as_na support this?
# remove notimplemented for object dtype there
if numeric_object_t is object:
isna_entry = checknull(val)
else:
isna_entry = _treat_as_na(val, is_datetimelike)

if not isna_entry:
nobs[lab, j] += 1
Expand Down

0 comments on commit c80d84a

Please sign in to comment.