Comments (11)
I like the idea of separating out the C++ code and keeping it as a fork of ripser, but honestly I would need to know more about the "C bindings" by @mtsch before I could be sure how I feel about it. What are the planned features there?
Thanks,
Chris
from ripser.py.
Hello,
Sorry for taking so long, I was pretty busy and then I went away for a week. I had the chance to take a look at the code and from what I can see, the pythondm
function is pretty much what I had in mind.
The only thing I'm not so sure about is storing lengths and indices as floats, but I don't really see a better way to do it.
I just need to add a function that transforms it into a C array and declare it as extern "C"
.
Cheers, Matija
from ripser.py.
from ripser.py.
I added the C thing for both the regular and sparse versions in #21.
About the outputs: do you maybe think it would be a good idea to return 4 arrays, one for the numbers of intervals in each dimension, one for the births and deaths, one for cocycle lengths and one for the cocycles. The C interface would then be something like int cripser(int** numperclass, float** birthsanddeaths, int** cocyclelength, int** cocycles, ...)
. The function would return the number of dimensions.
I'm not sure what the best way to do this is in C++ or how that works with Python, since I don't have a lot of experience with those.
from ripser.py.
Okay great! I merged that in, thanks.
One warning, though. I indeed got sparse matrices to work on that branch, but I seem to have broken cocycles. So I'm still working that out, which is why I haven't merged it to master yet. Luckily, this is something internal, and it shouldn't affect any of the code you've written. But careful using it until that's resolved.
Let me reach out to Uli Bauer again to see if he can help me fix the cocycles
from ripser.py.
No worries about the cocycles, I haven't needed them yet and they were never available in my wrapper. I do plan on supporting them, but I have some major restructuring to do first.
By the way, huge thanks for doing this, it's gonna be really useful for me!
from ripser.py.
@mtsch @sauln should I close this issue?
Or should we continue the discussion? I think the code is setup now that very small entry point blocks can be added to support other languages. Not sure if you want to keep my fork as just a Python fork or have those other languages in the fork as well?
from ripser.py.
I think it's better to have the bindings for different languages separated, or it could get messy. Either way, the Julia bindings need to be separate because Julia's package manager downloads code from Github directly and it requires a certain repo structure.
It would be perfect if the C++ code was separated from the bindings (or maybe merged into the main repo if Uli would have it), but I can live with the current solution as well. I would however propose a libripser
branch that only includes the C++ part and a Makefile that builds a .so
/.dll
file. I can prepare a PR this week if you agree. Another nitpick is that we should probably rename the pythondm
function to something else because it's not really Python specific.
Beside all that, It's looking great!
from ripser.py.
from ripser.py.
Hi @mtsch, I'm going to try to resolve #25 in the next few days. Once I do that, the C++ code should be frozen for a while. That would be a good time to make a pull request.
Thanks,
Chris
from ripser.py.
@mtsch, I merged in the new cython wrappers to master because I need to make another branch for matlab that uses then. Could you make a pull request with the stuff you need?
Thanks,
Chris
from ripser.py.
Related Issues (20)
- std::overflow_error
- Issue with plotting dependencies import HOT 7
- ValueError: numpy.ndarray size changed, may indicate binary incompatibility. HOT 7
- Build failure on GNU/Linux (GCC 11.1.0 and Python 3.9.6 on Arch Linux) HOT 3
- Jupyter notebook crash on input of large sparse distance matrix HOT 1
- [Suggestion] Throw exception when computing bottleneck distance
- Dead comments in 0-dimensional computation/preferential treatment of edges with zero value
- get_greedy_perm (Samples)
- Get the indices of the vectors forming a hole HOT 2
- Install Ripser on ArchLinux HOT 2
- ld: cannot find /lib64/libpthread.so.0
- `ValueError: numpy.ndarray size changed` HOT 5
- Failed to build ripser, error: subprocess-exited-with-error HOT 6
- Knowing required RAM to run ripser
- Unsuccessful installation HOT 2
- Is there a way to get ripser to use virtual memory? HOT 2
- Failed building wheel for Ripser on Win11 HOT 3
- ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject HOT 1
- Failed building wheel for ripser HOT 1
- Failing to generate H1 result with small dataset. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ripser.py.