mantidimaging.core.parallel.utility module

mantidimaging.core.parallel.utility.create_array(shape: ~typing.Tuple[int, ...], dtype: npt.DTypeLike = <class 'numpy.float32'>) ndarray[source]

Create an array, either in a memory file (if name provided), or purely in memory (if name is None)

  • shape – Shape of the array

  • dtype – Dtype of the array

  • name – Name of the shared memory array. If None, a non-shared array will be created

  • random_name – Whether to randomise the name. Will discard anything in the name parameter


The created Numpy array

mantidimaging.core.parallel.utility.enough_memory(shape, dtype)[source]
mantidimaging.core.parallel.utility.execute_impl(img_num: int, partial_func: partial, cores: int, chunksize: int, progress: Progress, msg: str)[source]
mantidimaging.core.parallel.utility.multiprocessing_necessary(shape: int | Tuple[int, int, int] | List, cores) bool[source]