aparrish / simpleneighbors

A clean and easy interface for performing nearest-neighbor lookups
BSD 3-Clause "New" or "Revised" License
50 stars 1 forks source link

The load function does not work as expected #7

Open rupamroy opened 4 years ago

rupamroy commented 4 years ago

I create a simpleneighbor index with 2 dim vectors and build and save it and also when i test it it works fine. Then in another program I load that index from the saved file using the load method and try to use the index, That comes back with errors. Can you help? I am attaching the screenshot of the whole thing which will clearly explain what is going on.

Simpleneighbors

aparrish commented 3 years ago

Hi! The .load() method should be called on the SimpleNeighbors class, not on an object. The code in your second notebook should read:

from simpleneighbors import SimpleNeighbors
sim = SimpleNeighbors.load('test')

Apologies for the confusion!