360fc6fbe7509cc50ae13fe4b952005cbfabd13e,Reference.py,Reference,updatePixels,#Reference#,117

Before Change


        // 
        // The pixelBlocks dictionary does not contain scalars. 
        inputBlock = pixelBlocks["raster_pixels"]                  // get the input raster pixel block.
        inputBlocks = pixelBlocks["rasters_pixels"]                  // get the input raster pixel block.
        red = np.array(inblock[0], dtype="float")                   // extractbandids ensures first band is Red.
        ir = np.array(inblock[1], dtype="float")                    // extractbandids ensures second band is Infrared.

After Change


        // This method can update pixelBlocks["output_pixels"] and pixelBlocks["output_mask"]. 
        // Note: the pixelBlocks dictionary does not contain any scalars parameters.

        if not pixelBlocks.has_key("raster_pixels"):
          raise Exception("No input raster was provided.")

        inputBlock = pixelBlocks["raster_pixels"]           // get pixels of an raster
        red  = np.array(inputBlock[0], dtype="float")       // assuming red"s the first band
        blue = np.array(inputBlock[2], dtype="float")       // assuming blue"s the third band
        outBlock = (red + blue) / 2.0

        np.copyto(pixelBlocks["output_pixels"], outBlock, casting="unsafe")     // copy local array to output pixel block.
        return pixelBlocks
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: Esri/raster-functions
Commit Name: 360fc6fbe7509cc50ae13fe4b952005cbfabd13e
Time: 2014-08-27
Author: akferoz@esri.com
File Name: Reference.py
Class Name: Reference
Method Name: updatePixels


Project Name: SheffieldML/GPy
Commit Name: 8b621a409cd07d0f5610a2648b6413322c39a822
Time: 2017-08-10
Author: akash.dhaka@aalto.fi
File Name: GPy/likelihoods/likelihood.py
Class Name: Likelihood
Method Name: ep_gradients


Project Name: masa-su/pixyz
Commit Name: 8aeaf156982b4164657876a485d3b0834d991964
Time: 2020-09-14
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/flow_distribution.py
Class Name: TransformedDistribution
Method Name: _inference


Project Name: masa-su/pixyz
Commit Name: 5c692f345e539ecf5d3a4b37d8150cea82ee41bf
Time: 2020-09-29
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/flow_distribution.py
Class Name: TransformedDistribution
Method Name: _inference