Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lshash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
__license__ = 'MIT'
__version__ = '0.0.4dev'

from lshash import LSHash
from .lshash import LSHash
8 changes: 4 additions & 4 deletions lshash/lshash.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import json
import numpy as np

from storage import storage
from .storage import storage

try:
from bitarray import bitarray
Expand Down Expand Up @@ -92,7 +92,7 @@ def _init_uniform_planes(self):
self.uniform_planes = [t[1] for t in npzfiles]
else:
self.uniform_planes = [self._generate_uniform_planes()
for _ in xrange(self.num_hashtables)]
for _ in range(self.num_hashtables)]
try:
np.savez_compressed(self.matrices_filename,
*self.uniform_planes)
Expand All @@ -101,14 +101,14 @@ def _init_uniform_planes(self):
raise
else:
self.uniform_planes = [self._generate_uniform_planes()
for _ in xrange(self.num_hashtables)]
for _ in range(self.num_hashtables)]

def _init_hashtables(self):
""" Initialize the hash tables such that each record will be in the
form of "[storage1, storage2, ...]" """

self.hash_tables = [storage(self.storage_config, i)
for i in xrange(self.num_hashtables)]
for i in range(self.num_hashtables)]

def _generate_uniform_planes(self):
""" Generate uniformly distributed hyperplanes and return it as a 2D
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries',
],
)