Skip to content

lapjv solver #94

@berhane

Description

@berhane

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions