Closed Rhuax closed 6 years ago
I have not tested it, but you should be able to pickle/unpickle kdtrees. Have you tried this already, or do you have some more specific requirements?
There are problems with lambda functions. I found a workaround: get all indexed points, save them to file. Later, create a new kdtree using points read from the file. It's obviously a bad solution.
By the way, handling lambda functions should solve the problem.
https://stackoverflow.com/questions/25348532/can-python-pickle-lambda-functions
@stefankoegl Did you check it?
Problem solved using dill package, which can handle lambda functions. It would be still useful having a wrapper inside the kdtree class. I close the issue
I think it would be extremely useful adding methods to save and load the kdtree to file.