e5b8e81d2d33823142cc88eed6a5368c8e283a98,scipy/spatial/distance.py,,cdist,#Any#Any#Any#,1899
Before Change
dm = np.zeros((mA, mB), dtype=np.double)
// compute blacklist for deprecated kwargs
if(metric in _METRICS["minkowski"].aka or
metric == "test_minkowski" or metric == minkowski):
kwargs_blacklist = ["w", "V", "VI"]
elif(metric in _METRICS["wminkowski"].aka or
metric == "test_wminkowski" or metric == wminkowski):
kwargs_blacklist = ["V", "VI"]
elif(metric in _METRICS["seuclidean"].aka or
metric == "test_seuclidean" or metric == seuclidean):
kwargs_blacklist = ["p", "w", "VI"]
elif(metric in _METRICS["mahalanobis"].aka or
metric == "test_mahalanobis" or metric == mahalanobis):
kwargs_blacklist = ["p", "w", "V"]
else:
kwargs_blacklist = ["p", "w", "V", "VI"]
_filter_deprecated_kwargs(kwargs, kwargs_blacklist)
if callable(metric):
After Change
mstr = metric.lower()
// NOTE: C-version still does not support weights
if "w" in kwargs and not mstr.startswith("test_"):
if mstr in ["seuclidean", "se", "s", "mahalanobis"]:
raise ValueError("metric %s incompatible with weights" % mstr)
// need to use python version for weighting
mstr = "test_%s" % mstr
metric_name = _METRIC_ALIAS.get(mstr, None)
if metric_name is not None:
XA, XB, typ, kwargs = _validate_cdist_input(XA, XB, mA, mB, n,
metric_name, **kwargs)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: scipy/scipy
Commit Name: e5b8e81d2d33823142cc88eed6a5368c8e283a98
Time: 2017-09-13
Author: apbard@users.noreply.github.com
File Name: scipy/spatial/distance.py
Class Name:
Method Name: cdist
Project Name: open-mmlab/mmcv
Commit Name: b85136772d4a78a3cdc7779301f984ad0dd21235
Time: 2019-04-14
Author: yhcao6@gmail.com
File Name: mmcv/runner/hooks/logger/text.py
Class Name: TextLoggerHook
Method Name: log
Project Name: scipy/scipy
Commit Name: e5b8e81d2d33823142cc88eed6a5368c8e283a98
Time: 2017-09-13
Author: apbard@users.noreply.github.com
File Name: scipy/spatial/distance.py
Class Name:
Method Name: pdist