tlpipe.container.container.BasicTod.all_data_operate

BasicTod.all_data_operate(func, copy_data=False, **kwargs)[source]

Operation to the whole main data.

Note since the main data is distributed on different processes, func should not have operations that depend on elements not held in the local array of each process.

Parameters:
  • func (function object) – The opertation function object. It is of type func(array, self, **kwargs), which will operate on the array and return an new array with the same shape and dtype.
  • copy_data (bool, optional) – If True, func will operate on a copy of the data, so changes will have no impact on the data the container holds. Default False.
  • **kwargs (any other arguments) – Any other arguments that will passed to func.