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

New Python bindings might help avoid STDOUT #1

Closed
sauln opened this issue Apr 19, 2018 · 5 comments
Closed

New Python bindings might help avoid STDOUT #1

sauln opened this issue Apr 19, 2018 · 5 comments

Comments

@sauln
Copy link

sauln commented Apr 19, 2018

Hi @mtsch. Did you see @ctralie and others put together some nice python bindings and overhauled the C++ code so it can be called directly.

https://github.com/ctralie/ripser
https://github.com/ctralie/ripser/blob/master/ripser/ripser.cpp

This update to ripser.cpp might help you rework the Julia bindings so you don't rely out piping STDOUT.

@ctralie
Copy link

ctralie commented Apr 21, 2018

Yes, have a look at my version of ripser.cpp to see how this can be done

https://github.com/ctralie/ripser/blob/master/ripser/ripser.cpp

I've created entry points for Python and Matlab on lines 1154 and 1039, respectively. Let me know if you have any questions

@mtsch
Copy link
Owner

mtsch commented Apr 22, 2018

This looks really nice, thanks to both of you! I'll start working on this soon and will ping you if I need anything.

By the way, if you're interested, I can make a pull request when I'm done. I'll be writing a C wrapper which could potentially be used for wrapping in other languages and I think it's nicer if we don't have a bunch of Ripser forks lying around...

@sauln
Copy link
Author

sauln commented Apr 22, 2018

I like the idea! I'm not sure the best way to go about doing that though. We could put together bindings for many languages (Python, Matlab, Julia, WASM are all in the works). Should there be a different repo for each one and they all use cpp from the main fork? Or each be their own fork?

It might be better to structure the Python ripser similarly to how you have the Julia ripser. 🤷‍♂️

@ctralie
Copy link

ctralie commented Apr 22, 2018

Cool! I'm curious to hear more about the C wrapper, and how it differs from the Matlab and Python entry points

@mtsch
Copy link
Owner

mtsch commented Apr 23, 2018

I think it would be best if the main cpp code was in one repo and wrappers (each in its own repo) would use that as a library. Having too many languages in one place might get confusing, but I'm not 100% sure that's the best way.

Either way, I'll start with making a C wrapper and add it as a pull request to your repo when I'm done.

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