Skip to content

Unable to get lin_kerdighan_tsp() working #11

@folterj

Description

@folterj

I'm unable to get lin_kerdighan_tsp() working.
e.g. lin_kerdighan_tsp(distance_matrix)

... lin_kerdighan_tsp.py", line 46, in _get_mst_and_add_two_edges
    result = np.insert(np.insert(mst_without_starting_node, 0, np.array([0, 0, 0, 0]), axis=0), 0,
ValueError: could not broadcast input array from shape (1,4) into shape (1,229)

From the function arguments I'm assuming it is used the same as christofides_tsp() - this function works fine using the same distance_matrix.
Reading the readme and ReadTheDocs.io pages seems to miss function usage.

Python version 3.8
Pytsp version 0.2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions