Closed Rakesh4G closed 3 years ago
There is only one change in base.py
Rest changes are formatting changes as per black
.
I have also added pytest to capture this bug.
Also added a couple more test cases to complete code coverage:
https://travis-ci.org/github/carsonfarmer/fastpair/jobs/771542325
---------- coverage: platform linux, python 3.5.10-final-0 -----------
Name Stmts Miss Cover Missing
--------------------------------------------------------------
fastpair/__init__.py 2 0 100%
fastpair/base.py 123 0 100%
fastpair/test/test_fastpair.py 205 0 100%
--------------------------------------------------------------
TOTAL 330 0 100%
======================= 15 passed, 294 warnings in 1.37s =======================
Thanks for the contribution @Rakesh4G. Are you interested in having this package deployed to pypi? I can probably prioritize that later this week?
Thanks for the contribution @Rakesh4G. Are you interested in having this package deployed to pypi? I can probably prioritize that later this week?
Thanks @carsonfarmer , package deployed to pypi would be really great.
Fixed error when n of points is less than self.min_points
Fixes: https://github.com/carsonfarmer/fastpair/issues/15
The problem was seen when using custom distance function, and fp was not initialized as the total number of points were less than self.min_points.
when doing brute_force it is ignoring dist function that is used to initialize FastPair.
@CMCDragonkai @vriez