Esempio n. 1
0
 def test_empty_input_b(self):
     candidate_pairs = similarities.dice_coefficient(
         (self.filters1, ()), self.default_threshold, self.default_k)
     sims, (indices0, indices1) = candidate_pairs
     assert len(sims) == len(indices0) == len(indices1) == 0
     assert sims.typecode in FLOAT_ARRAY_TYPES
     assert indices0.typecode in UINT_ARRAY_TYPES
     assert indices1.typecode in UINT_ARRAY_TYPES
Esempio n. 2
0
 def test_default(self):
     similarity = similarities.dice_coefficient(self.filters,
                                                self.default_threshold,
                                                self.default_k)
     self._check_proportion(similarity)