Parallel (sitelle.parallel)¶
Introduction¶
This module contains helper methods for parallelization of process.
Because we mostly work on ndarray and DataFrame, we build three main parallelized methods:
parallel_apply_along_axisthat mimicksnumpy.apply_along_axis()signatureparallel_apply_over_frameto iterate over 2D frames of the datacubes (analyse images)parallel_apply_over_dfthat mimickspandas.DataFrame.apply
Reference/API¶
sitelle.parallel Module¶
Functions¶
available_cpu_count() |
Number of available virtual or physical CPUs on this system, i.e. |
parallel_apply_along_axis(func1d, axis, arr, …) |
Apply a function to 1-D slices along the given axis. |
apply_over_frames(func2d, cube, *args, **kwargs) |
Iterates over the z dimension of a cube to apply a function on each frame (i.e. |
parallel_apply_over_frames(func2d, cube, …) |
Iterates over the z dimension of a cube to apply a function on each frame (i.e. |
parallel_apply_over_df(df, func[, axis, …]) |
Iterates over a pandas Dataframe to apply a function on each line, taking advantage of multiple cores. |