lmcinnes / pynndescent

A Python nearest neighbor descent for approximate nearest neighbors
BSD 2-Clause "Simplified" License
899 stars 105 forks source link

Fix "'NNDescent' object has no attribute '_vertex_order'" crash in NNDescent.update #147

Closed ThomasNickerson closed 3 years ago

ThomasNickerson commented 3 years ago

Part of the fix for https://github.com/lmcinnes/umap/issues/790

Check that the search graph has been initialized in NNDescent.update to prevent reference to a nonexistent self._vertex_order. This same check is done in the other methods that reference the same property.

Also fixes an error in the NNDescent docstring that stated the wrong default value for compressed. This causes problems for UMAP.update because UMAP assumes compressed=False still.

lmcinnes commented 3 years ago

Thanks!