Skip to content

DOC: fix cython example (failed on Windows) (GH6002) #11426

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

Conversation

jorisvandenbossche
Copy link
Member

Closes #6002

The signature of apply_integrate_f_wrap (http://pandas-docs.github.io/pandas-docs-travis/enhancingperf.html#more-advanced-techniques) used Py_ssize_t but on Windows that gives an error, as the dataframe is generated with numpy random arrays, which gives int32 on Windows, while Py_ssize_t is int64 on 64 bit Windows.

@jorisvandenbossche jorisvandenbossche added this to the 0.17.1 milestone Oct 24, 2015
@@ -274,7 +274,7 @@ advanced cython techniques:
...: return s * dx
...: @cython.boundscheck(False)
...: @cython.wraparound(False)
...: cpdef np.ndarray[double] apply_integrate_f_wrap(np.ndarray[double] col_a, np.ndarray[double] col_b, np.ndarray[Py_ssize_t] col_N):
...: cpdef np.ndarray[double] apply_integrate_f_wrap(np.ndarray[double] col_a, np.ndarray[double] col_b, np.ndarray[int] col_N):
...: cdef Py_ssize_t i, n = len(col_N)
Copy link
Contributor

Choose a reason for hiding this comment

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

prob should change all Py_ssize_t to int (next line down)

Copy link
Member Author

Choose a reason for hiding this comment

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

I suppose those are not a problem, as they are only for iterating

Copy link
Contributor

Choose a reason for hiding this comment

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

just for consistency

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, updated

jorisvandenbossche added a commit that referenced this pull request Nov 1, 2015
DOC: fix cython example (failed on Windows) (GH6002)
@jorisvandenbossche jorisvandenbossche merged commit bb6a9f0 into pandas-dev:master Nov 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Windows Windows OS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants