c8102caf93b5ef5faa7effbdd581d83c632c0b83,skvideo/motion/block.py,,_minCost,#Any#,14

Before Change


    h, w = costs.shape
    if costs[h/2, w/2] == 0:
        return np.int((h-1)/2), np.int((w-1)/2), 0
    idx = np.unravel_index(np.argmin(costs), costs.shape)
    return np.int(idx[0]), np.int(idx[1]), costs[idx]

After Change


    mi = 65537

    for i in xrange(h): 
      for j in xrange(w): 
        if costs[i, j] < mi:
          mi = costs[i, j]
          dx = j
          dy = i


    return dx, dy, mi

//def _minCost(costs):
//    h, w = costs.shape
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: scikit-video/scikit-video
Commit Name: c8102caf93b5ef5faa7effbdd581d83c632c0b83
Time: 2016-12-05
Author: tgoodall@utexas.edu
File Name: skvideo/motion/block.py
Class Name:
Method Name: _minCost


Project Name: automl/auto-sklearn
Commit Name: 225f23c5adb3e11d027de9e3aa514c7cab8b320d
Time: 2015-06-13
Author: feurerm@informatik.uni-freiburg.de
File Name: autosklearn/data/split_data.py
Class Name:
Method Name: split_data


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 23d00b78af8b6fc554a033c30dc4b0f8ffaf4804
Time: 2018-10-26
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/attacks/deepfool.py
Class Name: DeepFool
Method Name: generate


Project Name: scikit-video/scikit-video
Commit Name: c8102caf93b5ef5faa7effbdd581d83c632c0b83
Time: 2016-12-05
Author: tgoodall@utexas.edu
File Name: skvideo/motion/block.py
Class Name:
Method Name: _minCost