21758dd81de16d2bfdcf1a0d5d6d98f25a2e5868,autosklearn/metrics/util.py,,sanitize_array,#Any#,12

Before Change


    :return:
    
    a = np.ravel(array)
    maxi = np.nanmax((filter(lambda x: x != float("inf"), a))
                     )  // Max except NaN and Inf
    mini = np.nanmin((filter(lambda x: x != float("-inf"), a))
                     )  // Mini except NaN and Inf
    array[array == float("inf")] = maxi

After Change


    //mini = np.nanmin((filter(lambda x: x != float("-inf"), a))
    //                 )  // Mini except NaN and Inf
    maxi = np.nanmax(a[np.isfinite(a)])
    mini = np.nanmin(a[np.isfinite(a)])
    array[array == float("inf")] = maxi
    array[array == float("-inf")] = mini
    mid = (maxi + mini) / 2
    array[np.isnan(array)] = mid
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: automl/auto-sklearn
Commit Name: 21758dd81de16d2bfdcf1a0d5d6d98f25a2e5868
Time: 2015-11-13
Author: feurerm@informatik.uni-freiburg.de
File Name: autosklearn/metrics/util.py
Class Name:
Method Name: sanitize_array


Project Name: automl/auto-sklearn
Commit Name: 21758dd81de16d2bfdcf1a0d5d6d98f25a2e5868
Time: 2015-11-13
Author: feurerm@informatik.uni-freiburg.de
File Name: autosklearn/metrics/util.py
Class Name:
Method Name: normalize_array


Project Name: deepfakes/faceswap
Commit Name: 1daa7dc6f6df2cb22af40e641d93e808c830e774
Time: 2020-09-23
Author: 36920800+torzdf@users.noreply.github.com
File Name: lib/gui/display_graph.py
Class Name: GraphBase
Method Name: axes_data_get_min_max