giotto-ai / pyflagser

Python bindings and API for the flagser C++ library (https://github.com/luetge/flagser).
Other
13 stars 15 forks source link

Add support to numpy arays instead of reading a file for the input data #3

Closed reds-heig closed 4 years ago

reds-heig commented 4 years ago

Reference Issues/PRs

2 Instead of passing a file to flagser directly give him the data. This allow to not store any data on disk.

What does this implement/fix? Explain your changes.

This PR add support to python bindings for flagser to take as input numpy arrays. Now instead of taking a file as input with vertexes and vertices. Both parameters must be provided separately. Also because it was quite straightforward to implement it, the bindings support directed and undirected flags computation. By default it computes directed computation.

Any other comments?

Regards, Julián