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

Before Change



    def updatePixels(self, tlc, shape, props, **pixelBlocks):
        inBlocks = pixelBlocks["rasters_pixels"]                    // get a tuple of pixel blocks where each element is...
        n = len(inBlocks)                                           // ...a numpy array corresponding to the pixel block of an input raster
        if (n < 1):
          raise Exception("No input rasters provided.")

        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")

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: 3

Non-data size: 8

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: ufal/npfl114
Commit Name: 65869e202012462ad86ccd71e841bdf3f406e685
Time: 2019-03-20
Author: milan@strakovi.com
File Name: labs/02/gym_cartpole_evaluate.py
Class Name:
Method Name:


Project Name: mariogeiger/se3cnn
Commit Name: 9c309a959052ec40cf92cf4baa3894f5118cf8c4
Time: 2019-07-08
Author: geiger.mario@gmail.com
File Name: se3cnn/blocks/point_gated_block.py
Class Name: PointGatedBlock
Method Name: forward