Compare commits

..

1 Commits

Author SHA1 Message Date
d3d3cdfa96 remove dependency on scipy 2016-05-17 12:31:45 +00:00

View File

@ -77,14 +77,14 @@ def _ncc_c(x,y):
def _sbd(x, y):
#"""
#>>> _sbd([1,1,1], [1,1,1])
#(-2.2204460492503131e-16, array([1, 1, 1]))
#>>> _sbd([0,1,2], [1,2,3])
#(0.043817112532485103, array([1, 2, 3]))
#>>> _sbd([1,2,3], [0,1,2])
#(0.043817112532485103, array([0, 1, 2]))
#"""
"""
>>> _sbd([1,1,1], [1,1,1])
(-2.2204460492503131e-16, array([1, 1, 1]))
>>> _sbd([0,1,2], [1,2,3])
(0.043817112532485103, array([1, 2, 3]))
>>> _sbd([1,2,3], [0,1,2])
(0.043817112532485103, array([0, 1, 2]))
"""
ncc = _ncc_c(x, y)
idx = ncc.argmax()
dist = 1 - ncc[idx]