energy_of_grid_labeling is not working for list.
Closed this issue · 1 comments
bejnpenik commented
In function energy_of_grid_labeling from fastmin module (fastmin.py file line 51) instead of:
**binary += V[labels[slice0], labels[slice1]].sum()**
there should probably be:
**binary += V[labels[tuple(slice0)], labels[tuple(slice1)]].sum()**
because currently it is throwing the exception:
IndexError: only integers, slices (:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indices
Regards, Branislav
pmneila commented
Hi,
Thank you for letting me know. I just released a new version that fixes this error. You can install it with pip in the usual manner:
python -m pip install --upgrade PyMaxflow
Best