b5b4a8a1488e8bd72a99b3969e85068da0fab975,nilearn/image/image.py,,crop_img,#Any#Any#Any#,180
Before Change
niimg = check_niimg(niimg)
data = niimg.get_data()
absdata = np.abs(data)
infty_norm = absdata.max()
coords = np.array(np.where(absdata > rtol * infty_norm))
start = coords.min(axis=1)
end = coords.max(axis=1) + 1
After Change
niimg = check_niimg(niimg)
data = niimg.get_data()
infinity_norm = max(-data.min(), data.max())
passes_threshold_above = data > rtol * infinity_norm
passes_threshold_below = data < -rtol * infinity_norm
coords = np.array(np.where(
np.logical_or(passes_threshold_above,
passes_threshold_below)))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: nilearn/nilearn
Commit Name: b5b4a8a1488e8bd72a99b3969e85068da0fab975
Time: 2014-03-05
Author: michael.eickenberg@gmail.com
File Name: nilearn/image/image.py
Class Name:
Method Name: crop_img
Project Name: matplotlib/matplotlib
Commit Name: 7ad4996b6106e601ed7136c11e17abbb149ef889
Time: 2019-04-27
Author: nelle.varoquaux@gmail.com
File Name: examples/lines_bars_and_markers/scatter_hist.py
Class Name:
Method Name:
Project Name: matplotlib/matplotlib
Commit Name: eaa7025a37930ddfac810721c14452548db87ebc
Time: 2019-04-26
Author: 2836374+timhoffm@users.noreply.github.com
File Name: examples/lines_bars_and_markers/scatter_hist.py
Class Name:
Method Name: