panns
panns copied to clipboard
Error creating Pann index on Windows 8.1 64bit
ERROR:
Traceback (most recent call last):
File "..\approximate_nearest_neighbors/panns_test/main.py", line 12, in <module>
p.build(50)
File "..\site-packages\panns\index.py", line 136, in build
self.build_sequential(c)
File "..\site-packages\panns\index.py", line 152, in build_sequential
self.make_tree(tree.root, children)
File "..\site-packages\panns\index.py", line 170, in make_tree
parent.proj = numpy.random.randint(2**32-1)
File "mtrand.pyx", line 1262, in mtrand.RandomState.randint (numpy\random\mtrand\mtrand.c:14458)
ValueError: high is out of bounds for int32
RESOLUTION:
explicitly include "dtype=numpy.uint32" at
class = "PannsIndex"
function = "make_tree"
original line = "parent.proj = numpy.random.randint(2**32-1)"
fixed line = "parent.proj = numpy.random.randint(2**32-1, dtype=numpy.uint32)"