Skip to content

A Potential Error caused by Python Version differences #4

@0215Arthur

Description

@0215Arthur

In the graphtool.py (line 23) :
distances = list(map(lambda x: euclidean_distance(p, x), points)) closests = np.argsort(distances)[1:k+1]
In Python3.x, the return of map function is different from python2.
So it should be:
distances =list(map(lambda x: euclidean_distance(p, x), points)) closests = np.argsort(distances)[1:k+1]

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