b0a92d6b0055b433d6246f96e3a2fc57499d8449,chaco/tools/pan_tool.py,PanTool,panning_mouse_move,#PanTool#,167

Before Change


                        domain_min = -inf
                if domain_max is None:
                    if self.restrict_to_data:
                        domain_max = max([source.get_data().max()
                                          for source in mapper.range.sources])
                    else:
                        domain_max = inf

                if (newlow <= domain_min) and (newhigh >= domain_max):

After Change


                // values.  As a first approximation, we"re just going to
                // use a linear approximation, which works perfectly for
                // linear mappers (which is used 99% of the time).
                data = [arr for arr in
                        (source.get_data() for source in mapper.range.sources)
                        if arr.size > 0]
                if domain_min is None:
                    if self.restrict_to_data:
                        domain_min = min([arr.min() for arr in data])
                    else:
                        domain_min = -inf
                if domain_max is None:
                    if self.restrict_to_data:
                        domain_max = max([arr.max() for arr in data])
                    else:
                        domain_max = inf
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: enthought/chaco
Commit Name: b0a92d6b0055b433d6246f96e3a2fc57499d8449
Time: 2014-09-29
Author: cfarrow@enthought.com
File Name: chaco/tools/pan_tool.py
Class Name: PanTool
Method Name: panning_mouse_move


Project Name: Shawn1993/cnn-text-classification-pytorch
Commit Name: 5c177f3d9a29fc7737bd4734315820d1c11c7e87
Time: 2019-07-17
Author: rriva002@ucr.edu
File Name: cnn_text_classification.py
Class Name: CNNClassifier
Method Name: predict


Project Name: rusty1s/pytorch_geometric
Commit Name: b2002a8ef80ecbecee09fd61b910c987648455c7
Time: 2020-08-26
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/karate.py
Class Name: KarateClub
Method Name: __init__