Skip to content

Commit

Permalink
import mask
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Jun 5, 2016
1 parent 754ec6a commit 8811a58
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sourmash_lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import itertools
import string

from . import _minhash

class Estimators(object):
"""
A simple bottom n-sketch MinHash implementation.
Expand All @@ -26,6 +24,8 @@ class Estimators(object):

def __init__(self, n=None, ksize=None, protein=False):
"Create a new MinHash estimator with size n and k-mer size ksize."
from . import _minhash

if n is None:
raise ValueError("n is required")
if ksize is None:
Expand All @@ -44,6 +44,8 @@ def __getstate__(self): # enable pickling
return (self.num, self.ksize, self.is_protein, self.mh.get_mins())

def __setstate__(self, tup):
from . import _minhash

(self.num, self.ksize, self.is_protein, mins) = tup
self.mh = _minhash.MinHash(self.num, self.ksize, self.is_protein)
for m in mins:
Expand Down

0 comments on commit 8811a58

Please sign in to comment.