giotto-ai / pyflagser

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

fix save_unweighted_flag by removing the leading '#' in the first line #69

Closed flomlo closed 3 years ago

flomlo commented 3 years ago

Currently the first line of a saved unweighted flag reads '# dim 0' whereas flagser strictly expects 'dim 0'.

What does this implement/fix? Explain your changes.

Adding the comments='' paramenter to np.save fixes this. This is done analogously to save_weighted_flag

Any other comments?

We did not observe this error before as load_unweighted_flag ignores the first line and does not strictly check if it is dim 0. One could "fix" that as well?

flomlo commented 3 years ago

I hope I pressed the right buttons to accept the suggested linting changes :)