5e3cd5a9f1dfc0e320d3ff5a384505bf06904365,nilearn/plotting/displays.py,BaseSlicer,_map_show,#BaseSlicer#Any#Any#,423

Before Change


                                    affine))
            if kwargs.get("vmin") is None or kwargs.get("vmax") is None:
                // Avoid dealing with masked arrays: they are slow
                if not np.any(not_mask):
                    // Everything is masked
                    vmin = vmax = 0
                else:
                    masked_map = np.asarray(data)[not_mask]
                    vmin = masked_map.min()
                    vmax = masked_map.max()
                if kwargs.get("vmin") is None:
                    kwargs["vmin"] = vmin
                if kwargs.get("vmax") is None:
                    kwargs["vmax"] = vmax

After Change


                    get_mask_bounds(nibabel.Nifti1Image(not_mask.astype(np.int),
                                    affine))

        data_2d_list = []
        for display_ax in self.axes.itervalues():
            try:
                data_2d = display_ax.transform_2d(data, affine)
            except IndexError:
                // We are cutting outside the indices of the data
                data_2d = None

            data_2d_list.append(data_2d)

        if kwargs.get("vmin") is None or kwargs.get("vmax") is None:
            if "vmin" not in kwargs:
                kwargs["vmin"] = max(d.min() for d in data_2d_list
                                     if d is not None)
            if "vmax" not in kwargs:
                kwargs["vmax"] = max(d.max() for d in data_2d_list
                                     if d is not None)

        bounding_box = (xmin_, xmax_), (ymin_, ymax_), (zmin_, zmax_)

        ims = []
        to_iterate_over = itertools.izip(self.axes.itervalues(), data_2d_list)
        for display_ax, data_2d in to_iterate_over:
            if data_2d is not None:
                im = display_ax.draw_2d(data_2d, data_bounds, bounding_box,
                                        type=type, **kwargs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: nilearn/nilearn
Commit Name: 5e3cd5a9f1dfc0e320d3ff5a384505bf06904365
Time: 2014-12-04
Author: loic.esteve@ymail.com
File Name: nilearn/plotting/displays.py
Class Name: BaseSlicer
Method Name: _map_show


Project Name: biocore/scikit-bio
Commit Name: a2867db5d7e0804654dda2721ced35d227b3e3bb
Time: 2015-09-03
Author: jai.rideout@gmail.com
File Name: skbio/alignment/_tabular_msa.py
Class Name: TabularMSA
Method Name: __init__


Project Name: idaholab/raven
Commit Name: 2a3d7175b8da52a64da24e2ed64ca3421ded6bbe
Time: 2017-05-25
Author: paul.talbot@inl.gov
File Name: framework/Optimizers/GradientBasedOptimizer.py
Class Name: GradientBasedOptimizer
Method Name: localFinalizeActualSampling