"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scipy/spatial/distance.py" between
scipy-1.6.2.tar.xz and scipy-1.6.3.tar.xz

About: SciPy are tools for mathematics, science, and engineering (for Python).

distance.py  (scipy-1.6.2.tar.xz):distance.py  (scipy-1.6.3.tar.xz)
skipping to change at line 1310 skipping to change at line 1310
2.0 2.0
>>> distance.yule([1, 1, 0], [0, 1, 0]) >>> distance.yule([1, 1, 0], [0, 1, 0])
0.0 0.0
""" """
u = _validate_vector(u) u = _validate_vector(u)
v = _validate_vector(v) v = _validate_vector(v)
if w is not None: if w is not None:
w = _validate_weights(w) w = _validate_weights(w)
(nff, nft, ntf, ntt) = _nbool_correspond_all(u, v, w=w) (nff, nft, ntf, ntt) = _nbool_correspond_all(u, v, w=w)
return float(2.0 * ntf * nft / np.array(ntt * nff + ntf * nft)) half_R = ntf * nft
if half_R == 0:
return 0.0
else:
return float(2.0 * half_R / (ntt * nff + half_R))
@np.deprecate(message="spatial.distance.matching is deprecated in scipy 1.0.0; " @np.deprecate(message="spatial.distance.matching is deprecated in scipy 1.0.0; "
"use spatial.distance.hamming instead.") "use spatial.distance.hamming instead.")
def matching(u, v, w=None): def matching(u, v, w=None):
""" """
Compute the Hamming distance between two boolean 1-D arrays. Compute the Hamming distance between two boolean 1-D arrays.
This is a deprecated synonym for :func:`hamming`. This is a deprecated synonym for :func:`hamming`.
""" """
return hamming(u, v, w=w) return hamming(u, v, w=w)
 End of changes. 1 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)