372cc580b234724920fee6045e0151abb2b8a823,Aggregation.py,Aggregation,updatePixels,#Aggregation#Any#Any#Any#,52

Before Change



        outBlock = np.array(inBlocks[0], dtype="f4")                // initialize output pixel block with the first input block
        for i in range(1, n):                                       // add each subsequent input block to our local output array
          outBlock = outBlock + np.array(inBlocks[i], dtype="f4")

        pixelBlocks["output_pixels"] = outBlock.astype(props["pixelType"])
        return pixelBlocks

After Change


    def updatePixels(self, tlc, shape, props, **pixelBlocks):
        inBlock = pixelBlocks["composite_pixels"]

        if len(inBlock.shape) <= 2 or inBlock.shape[0] == 1:
            outBlock = inBlock
        else:
            outBlock = np.sum(inBlock, axis=0)

        pixelBlocks["output_pixels"] = outBlock.astype(props["pixelType"])
        return pixelBlocks
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: Esri/raster-functions
Commit Name: 372cc580b234724920fee6045e0151abb2b8a823
Time: 2014-09-09
Author: akferoz@esri.com
File Name: Aggregation.py
Class Name: Aggregation
Method Name: updatePixels


Project Name: datascienceinc/Skater
Commit Name: 5601c4bb909b4146327fa68c6d5b668f997baaff
Time: 2017-03-21
Author: aikramer2@gmail.com
File Name: pyinterpret/data/dataset.py
Class Name: DataSet
Method Name: _build_metastore


Project Name: deepchem/deepchem
Commit Name: ed7782f0f59f1eef6453f47633fe9e15bda00f84
Time: 2017-03-23
Author: peter.eastman@gmail.com
File Name: deepchem/models/tensorflow_models/__init__.py
Class Name: TensorflowGraphModel
Method Name: fit


Project Name: ilastik/ilastik
Commit Name: 6fe60e43efbac200052a76b0a849c4c7cd4654a5
Time: 2018-04-25
Author: jonas.massa@iwr.uni-heidelberg.de
File Name: ilastik/applets/networkClassification/nnClassGui.py
Class Name: NNClassGui
Method Name: pred_nn