CellProfiler / centrosome

An open source image processing library
Other
18 stars 35 forks source link

lapjv solver #94

Open berhane opened 5 years ago

berhane commented 5 years ago

I'm trying to solve a simple 4x4 assignment problem using lapjv,

import numpy as np from centrosome import lapjv size=4 matrix=np.random.random((size,size)) assignment=lapjv.lapjv(size,size,matrix)

but keep getting an error message saying the dimensions of i,j don't match those of the cost matrix even though they do.

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.7/site-packages/centrosome/lapjv.py", line 42, in lapjv assert len(i) == len(costs), "costs must be the same length as i" AssertionError: costs must be the same length as i

What am I missing? I'm using

python 3.7.1 numpy-1.15.4 centrosome 1.1.6