Skip to content

Clean Up C Warnings #31935

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 7 commits into from
Feb 17, 2020
Merged
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
3 changes: 2 additions & 1 deletion pandas/_libs/algos.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from cpython.buffer import PyBuffer_IsContiguous
import cython
from cython import Py_ssize_t

Expand Down Expand Up @@ -1179,7 +1180,7 @@ def diff_2d(diff_t[:, :] arr,
Py_ssize_t periods, int axis):
cdef:
Py_ssize_t i, j, sx, sy, start, stop
bint f_contig = arr.flags.f_contiguous
bint f_contig = PyBuffer_IsContiguous(arr, 'F')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat. probably not worth the effort on our end, but itd be nice if cython automatically made this optimization

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh didn't look too much into the subsequent code; think could be cleaned up?


# Disable for unsupported dtype combinations,
# see https://github.com/cython/cython/issues/2646
Expand Down