Skip to content
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

Do we want to use Cython for wrapping? #3

Open
kyleabeauchamp opened this issue May 10, 2013 · 4 comments
Open

Do we want to use Cython for wrapping? #3

kyleabeauchamp opened this issue May 10, 2013 · 4 comments

Comments

@kyleabeauchamp
Copy link

We could convert rmsdcalc.c to a cython wrapper, as in current MDTraj.

@rmcgibbo

@ihaque
Copy link

ihaque commented May 10, 2013

👍 also consider cffi

@ghost ghost assigned kyleabeauchamp May 10, 2013
@kyleabeauchamp
Copy link
Author

One argument for cython is that it has really nice built-in support for Numpy arrays--I think cffi is still lacking some of these features. My favorite part about the new Cython wrappers is that I can use array indexing to grab pointers. I know this sounds really dumb, but this is my favorite line of code ever:

&xyz2[i,0,0],

@ihaque
Copy link

ihaque commented May 12, 2013

I can use array indexing to grab pointers

What, you don't like computing pointers manually from stride arrays?

@rmcgibbo
Copy link

That, @ihaque, is why when I do numerical C, I now use the gsl and functions like gsl_matrix_const_view_array_with_tda :)

But in all seriousness, re-wrapping the code in cython should be a pretty low priority, given that the C wrapper already works just fine. As we move towards py3k (the c wrappers are slightly different format for py3k, but cython will handle that for you) or other python interpreters (pypy), then it becomes an issue again. But in the mean time, this is nbd.

@kyleabeauchamp kyleabeauchamp removed their assignment Aug 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants