Compare commits

..

1 Commits

Author SHA1 Message Date
326ff3f667 remove dependency on scipy 2016-05-17 12:23:16 +00:00

View File

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