c8102caf93b5ef5faa7effbdd581d83c632c0b83,skvideo/motion/block.py,,_minCost,#,14
Before Change
def _minCost(costs):
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
h, w = costs.shape
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
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: UFAL-DSG/tgen
Commit Name: fb50688c503567c5db6207e45e2c5e2ee1ad33df
Time: 2014-08-25
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/features.py
Class Name:
Method Name: depth
Project Name: snorkel-team/snorkel
Commit Name: 92f1b43acaf2438ad86fd94f2713158f6fe93eda
Time: 2016-11-07
Author: henry.ehrenberg@outlook.com
File Name: snorkel/features/generic_features.py
Class Name:
Method Name: feats_from_matrix_generator