Skip to content

Optimizing arithmetic and logical operations

Cresson Remi requested to merge optimizing-functions-all-any into master
  • Introduce a Slicer class when the user calls something such as raster[:, :, 0]. This class has a dual way of working : it can be an ExtractROI or a BandMath such as im1b1, depending on how the result is used. If the result is written to disk or integrated in a pipeline, the ExtractROI app will be used. Otherwise, if the result is used in another Operation, we use the BandMath expression for sake of performance.
  • Introduce a logicalOperation class that is a specialization of Operation class for boolean logical operations i.e. >, <, >=, <=, ==, !=, & and |.
  • handle native operations (i.e. '+' etc...) with numpy objects
  • more efficient pyotb.where function, based on Operation
  • more efficient pyotb.any and pyotb.all
Edited by Cresson Remi

Merge request reports