43a60c9f4380448b9013efa4fb021796e7e1ff3c,test/test_mahalanobis_mixin.py,,test_components_is_2D,#Any#Any#,281

Before Change


  // we drop duplicates that might have been formed, i.e. of the form
  // aabc or abcc or aabb for quadruplets, and aa for pairs.
  if isinstance(estimator, _QuadrupletsClassifierMixin):
    for slice_idx in [slice(0, 2), slice(2, 4)]:
      pairs = trunc_data[:, slice_idx, :]
      diffs = pairs[:, 1, :] - pairs[:, 0, :]
      to_keep = np.where(np.abs(diffs.ravel()) > 1e-9)

After Change



  if isinstance(estimator, _QuadrupletsClassifierMixin):
    pairs_idx = [[0, 1], [2, 3]]
  elif isinstance(estimator, _TripletsClassifierMixin):
    pairs_idx = [[0, 1], [0, 2]]
  elif isinstance(estimator, _PairsClassifierMixin):
    pairs_idx = [[0, 1]]
  else:
    pairs_idx = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: metric-learn/metric-learn
Commit Name: 43a60c9f4380448b9013efa4fb021796e7e1ff3c
Time: 2020-06-17
Author: gabriel.rudloff@gmail.com
File Name: test/test_mahalanobis_mixin.py
Class Name:
Method Name: test_components_is_2D


Project Name: biotite-dev/biotite
Commit Name: b731f833810afd674f42d38ceb657a7a03608832
Time: 2017-12-12
Author: patrick.kunzm@gmail.com
File Name: src/biotite/sequence/annotation.py
Class Name: AnnotatedSequence
Method Name: __getitem__


Project Name: apache/incubator-mxnet
Commit Name: dd44c0c3bc168b3e88cda22c443283894fd24c54
Time: 2020-09-21
Author: lausen@amazon.com
File Name: python/mxnet/symbol/numpy/_symbol.py
Class Name: _Symbol
Method Name: __getitem__