diff --git a/lshash/__init__.py b/lshash/__init__.py index e805896..e4424c7 100644 --- a/lshash/__init__.py +++ b/lshash/__init__.py @@ -9,4 +9,4 @@ __license__ = 'MIT' __version__ = '0.0.4dev' -from lshash import LSHash +from .lshash import LSHash diff --git a/lshash/lshash.py b/lshash/lshash.py index 5c895a6..50e4132 100644 --- a/lshash/lshash.py +++ b/lshash/lshash.py @@ -8,7 +8,7 @@ import json import numpy as np -from storage import storage +from .storage import storage try: from bitarray import bitarray @@ -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) @@ -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 diff --git a/setup.py b/setup.py index b0a98e5..0dcb52c 100644 --- a/setup.py +++ b/setup.py @@ -37,6 +37,7 @@ 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Libraries', ], )