Skip to content

Commit

Permalink
list sampler
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed Jul 6, 2017
1 parent ccfe451 commit ffac79d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions dedupe/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def blockedSample(sampler, sample_size, predicates, *args) :
while remaining_sample and predicates :
random.shuffle(predicates)

new_sample = sampler(remaining_sample,
predicates,
*args)
new_sample = list(sampler(remaining_sample,
predicates,
*args))

filtered_sample = (subsample for subsample
in new_sample if subsample)
Expand All @@ -39,7 +39,6 @@ def blockedSample(sampler, sample_size, predicates, *args) :
% (sample_size, len(blocked_sample)))
break


predicates = [pred for pred, pred_sample
in zip(predicates, new_sample)
if pred_sample or pred_sample is None]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'doublemetaphone',
'highered>=0.2.0',
'canonicalize',
'simplecosine>=1.1',
'simplecosine>=1.2',
'haversine>=0.4.1',
'BTrees>=4.1.4',
'simplejson',
Expand All @@ -27,7 +27,7 @@
setup(
name='dedupe',
url='https://github.com/dedupeio/dedupe',
version='1.6.15',
version='1.6.16',
author='Forest Gregg',
author_email='fgregg@datamade.us',
description='A python library for accurate and scaleable data deduplication and entity-resolution',
Expand Down

0 comments on commit ffac79d

Please sign in to comment.