Use multicpu functionality to compute indices

Acoustic indices can summarize aspects of the acoustic energy distribution in audio recordings and are widely used to characterize animal acoustic communities[1-3]. In this example, we will see how to eficiently compute multiple acoustic indices, and present basics post-processing posibilities. The audio recordings used in this example can be downloaded from the open GitHub repository (https://github.com/scikit-maad/scikit-maad/tree/production/data).

# sphinx_gallery_thumbnail_path = '_auto_examples/2_advanced/images/sphx_glr_plot_extract_alpha_indices_multicpu_001.png'
import pandas as pd
import os
import time
import matplotlib.pyplot as plt

# Parallel processing packages
# from functools import partial
from tqdm import tqdm
from concurrent import futures

from maad import sound, features
from maad.util import date_parser
import multiprocessing as mp

Define the function that will be used for batch processing

# This function should work by itself without waiting for another process
# Here we defined a function to process a single audio file. The input arguments
# are the path to the audio file and the recording date of the audio file. Both
# arguments are in the dataframe df given by the function date_parser.

def single_file_processing (audio_path,
                            date) :
    """
    Parameters
    ----------
    audio_path : string
        full path to the audio file (.wav) to process.
        The full path is in the dataframe given by the function date_parser
    date : datetime
        date of recording of the audio file.
        The date is in the dataframe given by the function date_parser

    Returns
    -------
    df_indices : dataframe
        Dataframe containing all the temporal and spectral indices, as well as
        the audio path ('file' column) and the recording date ('Date' column)

    """

    # Load the original sound (16bits) and get the sampling frequency fs
    try :
        wave,fs = sound.load(filename=audio_path,
                            channel='left',
                            detrend=True,
                            verbose=False)

        """ ===================================================================
                        Computation in the time domain
        ===================================================================="""

        # compute all the audio indices and store them into a DataFrame
        # dB_threshold and rejectDuration are used to select audio events.
        df_audio_ind = features.all_temporal_alpha_indices(
                                    wave, fs,
                                    gain = G, sensibility = S,
                                    dB_threshold = 3, rejectDuration = 0.01,
                                    verbose = False, display = False)

        """ ===================================================================
                        Computation in the frequency domain
        ===================================================================="""

        # Compute the Power Spectrogram Density (PSD) : Sxx_power
        Sxx_power,tn,fn,ext = sound.spectrogram (
                                        wave, fs, window='hann',
                                        nperseg = 1024, noverlap=1024//2,
                                        verbose = False, display = False,
                                        savefig = None)

        # compute all the spectral indices and store them into a DataFrame
        # flim_low, flim_mid, flim_hi corresponds to the frequency limits in Hz
        # that are required to compute somes indices (i.e. NDSI)
        # if R_compatible is set to 'soundecology', then the output are similar to
        # soundecology R package.
        # mask_param1 and mask_param2 are two parameters to find the regions of
        # interest (ROIs). These parameters need to be adapted to the dataset in
        # order to select ROIs
        df_spec_ind, _ = features.all_spectral_alpha_indices(
                                                Sxx_power,
                                                tn,fn,
                                                flim_low = [0,1500],
                                                flim_mid = [1500,8000],
                                                flim_hi  = [8000,20000],
                                                gain = G, sensitivity = S,
                                                verbose = False,
                                                R_compatible = 'soundecology',
                                                mask_param1 = 6,
                                                mask_param2=0.5,
                                                display = False)

        """ ===================================================================
                        Create a dataframe
        ===================================================================="""
        # add scalar indices into the df_indices dataframe
        df_indices = pd.concat([df_audio_ind,
                                df_spec_ind], axis=1)

        # add date and audio_path
        df_indices.insert(0, 'Date', date)
        df_indices.insert(1, 'file', audio_path)

    except:
        # if an error occur, send an empty output
        df_indices = pd.DataFrame()

    return df_indices

Set Variables

We list all spectral and temporal acoustic indices that will be computed.

SPECTRAL_FEATURES=['MEANf','VARf','SKEWf','KURTf','NBPEAKS','LEQf',
'ENRf','BGNf','SNRf','Hf', 'EAS','ECU','ECV','EPS','EPS_KURT','EPS_SKEW','ACI',
'NDSI','rBA','AnthroEnergy','BioEnergy','BI','ROU','ADI','AEI','LFC','MFC','HFC',
'ACTspFract','ACTspCount','ACTspMean', 'EVNspFract','EVNspMean','EVNspCount',
'TFSD','H_Havrda','H_Renyi','H_pairedShannon', 'H_gamma', 'H_GiniSimpson','RAOQ',
'AGI','ROItotal','ROIcover']

TEMPORAL_FEATURES=['ZCR','MEANt', 'VARt', 'SKEWt', 'KURTt',
            'LEQt','BGNt', 'SNRt','MED', 'Ht','ACTtFraction', 'ACTtCount',
            'ACTtMean','EVNtFraction', 'EVNtMean', 'EVNtCount']

# Parameters of the audio recorder. This is not a mandatory but it allows
# to compute the sound pressure level of the audio file (dB SPL) as a
# sonometer would do.
S = -35         # Sensbility microphone-35dBV (SM4) / -18dBV (Audiomoth)
G = 26+16       # Amplification gain (26dB (SM4 preamplifier))

We parse the directory were the audio dataset is located in order to get a df with date and fullfilename. As the data were collected with a SM4 audio recording device we set the dateformat agument to ‘SM4’ in order to be able to parse the date from the filename. In case of Audiomoth, the date is coded as Hex in the filename. The path to the audio dataset is “../../data/indices/”.

if __name__ == '__main__':  # Multiprocessing should be declared under the main entry point
    mp.set_start_method("fork")   # This start method is necessary for macOS. It is the default method on Linux

    df = date_parser("../../data/indices/", dateformat='SM4', verbose=True)

    # Date is used as index. Reset the index in order to get back Date as column
    df.reset_index(inplace = True)

    #%%
    """ ===========================================================================
                    Mono CPU
    ============================================================================"""
    # Only one cpu is used to process all data in dataframe, row by row.
    # This is the common way to process the data but it has some limitations :
    # - only 1 CPU is used even if the computer has more CPUs.
    # - data are sequentially processed which means each file will wait for the
    # completion of the previous file in the list. If 1 file requires more time to
    # be processed, the time to complete the overall process will take longer.

    # create an empty dataframe. It will contain all ROIs found for each
    # audio file in the directory
    df_indices = pd.DataFrame()

    tic = time.perf_counter()
    with tqdm(total=len(df), desc="unique cpu indices calculation...") as pbar:
        for index, row in df.iterrows() :
            df_indices_temp = single_file_processing(row["file"], row["Date"])
            pbar.update(1)
            df_indices = pd.concat([df_indices, df_indices_temp])
    toc = time.perf_counter()

    # time duration of the process
    monocpu_duration = toc - tic

    print(f"Elapsed time is {monocpu_duration:0.1f} seconds")

    #%%%
    """ ===========================================================================
                    Multi CPU
    ============================================================================"""
    # At least 2 CPUs will be used in parallel and the files to process will be
    # distributed on each CPU depending on their availability. This will speed up
    # the process.

    # create an empty dataframe. It will contain all ROIs found for each
    # audio file in the directory
    df_indices = pd.DataFrame()

    # Number of CPU used for the calculation.
    nb_cpu = os.cpu_count()

    tic = time.perf_counter()
    # Multicpu process
    with tqdm(total=len(df), desc="multi cpu indices calculation...") as pbar:
        with futures.ProcessPoolExecutor(max_workers=nb_cpu) as pool:
            # give the function to map on several CPUs as well its arguments as
            # as list
            for df_indices_temp in pool.map(
                single_file_processing,
                df["file"].to_list(),
                df["Date"].to_list()
            ):
                pbar.update(1)
                df_indices = pd.concat([df_indices, df_indices_temp])
    toc = time.perf_counter()

    # time duration of the process
    multicpu_duration = toc - tic

    print(f"Elapsed time is {multicpu_duration:0.1f} seconds")

    #%%
    # Display the comparison between to methods
    # -----------------------------------------

    plt.style.use('ggplot')
    fig, ax = plt.subplots(1,1,figsize=(6,2))

    # bar graphs
    width = 0.75
    x = ['sequential (mono CPU)', 'parallel (multi CPU)']
    y = [monocpu_duration, multicpu_duration]
    ax.barh(x, y, width, color=('tab:blue','tab:orange'))
    ax.set_xlabel('Elapsed time (s)')
    ax.set_title("Comparison between sequential\n and parallel processing")

    fig.tight_layout()


    # %%
Comparison between sequential  and parallel processing
S4A03895_20190522_041500.wav
S4A03895_20190522_141500.wav
indices.csv
S4A03895_20190522_073000.wav
S4A03895_20190522_173000.wav
per_bin_indices.csv
S4A03895_20190522_010000.wav
S4A03895_20190522_014500.wav
S4A03895_20190522_110000.wav
S4A03895_20190522_114500.wav
S4A03895_20190522_213000.wav
S4A03895_20190522_180000.wav
S4A03895_20190522_184500.wav
S4A03895_20190522_080000.wav
S4A03895_20190522_084500.wav
S4A03895_20190522_221500.wav
S4A03895_20190522_203000.wav
S4A03895_20190522_094500.wav
S4A03895_20190522_090000.wav
S4A03895_20190522_194500.wav
S4A03895_20190522_190000.wav
S4A03895_20190522_231500.wav
S4A03895_20190522_151500.wav
S4A03895_20190522_051500.wav
S4A03895_20190522_104500.wav
S4A03895_20190522_100000.wav
S4A03895_20190522_004500.wav
S4A03895_20190522_000000.wav
S4A03895_20190522_163000.wav
S4A03895_20190522_063000.wav
S4A03895_20190522_223000.wav
S4A03895_20190522_211500.wav
S4A03895_20190522_071500.wav
S4A03895_20190522_171500.wav
S4A03895_20190522_024500.wav
S4A03895_20190522_020000.wav
S4A03895_20190522_124500.wav
S4A03895_20190522_120000.wav
S4A03895_20190522_043000.wav
S4A03895_20190522_143000.wav
S4A03895_20190522_161500.wav
S4A03895_20190522_061500.wav
S4A03895_20190522_153000.wav
S4A03895_20190522_053000.wav
S4A03895_20190522_130000.wav
S4A03895_20190522_134500.wav
S4A03895_20190522_030000.wav
S4A03895_20190522_034500.wav
S4A03895_20190522_233000.wav
S4A03895_20190522_201500.wav
S4A03895_20190522_193000.wav
S4A03895_20190522_093000.wav
S4A03895_20190522_200000.wav
S4A03895_20190522_204500.wav
S4A03895_20190522_003000.wav
S4A03895_20190522_103000.wav
S4A03895_20190522_060000.wav
S4A03895_20190522_064500.wav
S4A03895_20190522_160000.wav
S4A03895_20190522_164500.wav
S4A03895_20190522_031500.wav
S4A03895_20190522_131500.wav
S4A03895_20190522_174500.wav
S4A03895_20190522_170000.wav
S4A03895_20190522_074500.wav
S4A03895_20190522_070000.wav
S4A03895_20190522_113000.wav
S4A03895_20190522_013000.wav
S4A03895_20190522_121500.wav
S4A03895_20190522_021500.wav
S4A03895_20190522_083000.wav
S4A03895_20190522_183000.wav
S4A03895_20190522_214500.wav
S4A03895_20190522_210000.wav
S4A03895_20190522_054500.wav
S4A03895_20190522_050000.wav
S4A03895_20190522_154500.wav
S4A03895_20190522_150000.wav
S4A03895_20190522_033000.wav
S4A03895_20190522_133000.wav
S4A03895_20190522_001500.wav
S4A03895_20190522_101500.wav
S4A03895_20190522_234500.wav
S4A03895_20190522_230000.wav
S4A03895_20190522_191500.wav
S4A03895_20190522_091500.wav
S4A03895_20190522_220000.wav
S4A03895_20190522_224500.wav
S4A03895_20190522_081500.wav
S4A03895_20190522_181500.wav
S4A03895_20190522_123000.wav
S4A03895_20190522_023000.wav
S4A03895_20190522_140000.wav
S4A03895_20190522_144500.wav
S4A03895_20190522_040000.wav
S4A03895_20190522_044500.wav
S4A03895_20190522_111500.wav
S4A03895_20190522_011500.wav

unique cpu indices calculation...:   0%|          | 0/96 [00:00<?, ?it/s]
unique cpu indices calculation...:   1%|1         | 1/96 [00:00<00:16,  5.78it/s]
unique cpu indices calculation...:   2%|2         | 2/96 [00:00<00:15,  5.88it/s]
unique cpu indices calculation...:   3%|3         | 3/96 [00:00<00:15,  5.91it/s]
unique cpu indices calculation...:   4%|4         | 4/96 [00:00<00:15,  5.91it/s]
unique cpu indices calculation...:   5%|5         | 5/96 [00:00<00:15,  5.97it/s]
unique cpu indices calculation...:   6%|6         | 6/96 [00:01<00:15,  6.00it/s]
unique cpu indices calculation...:   7%|7         | 7/96 [00:01<00:14,  5.95it/s]
unique cpu indices calculation...:   8%|8         | 8/96 [00:01<00:14,  5.94it/s]
unique cpu indices calculation...:   9%|9         | 9/96 [00:01<00:14,  5.90it/s]
unique cpu indices calculation...:  10%|#         | 10/96 [00:01<00:14,  5.87it/s]
unique cpu indices calculation...:  11%|#1        | 11/96 [00:01<00:14,  5.86it/s]
unique cpu indices calculation...:  12%|#2        | 12/96 [00:02<00:14,  5.86it/s]
unique cpu indices calculation...:  14%|#3        | 13/96 [00:02<00:14,  5.89it/s]
unique cpu indices calculation...:  15%|#4        | 14/96 [00:02<00:13,  5.87it/s]
unique cpu indices calculation...:  16%|#5        | 15/96 [00:02<00:13,  5.92it/s]
unique cpu indices calculation...:  17%|#6        | 16/96 [00:02<00:13,  5.94it/s]
unique cpu indices calculation...:  18%|#7        | 17/96 [00:02<00:13,  5.97it/s]
unique cpu indices calculation...:  19%|#8        | 18/96 [00:03<00:13,  5.99it/s]
unique cpu indices calculation...:  20%|#9        | 19/96 [00:03<00:12,  5.99it/s]
unique cpu indices calculation...:  21%|##        | 20/96 [00:03<00:13,  5.83it/s]
unique cpu indices calculation...:  22%|##1       | 21/96 [00:03<00:13,  5.56it/s]
unique cpu indices calculation...:  23%|##2       | 22/96 [00:03<00:13,  5.42it/s]
unique cpu indices calculation...:  24%|##3       | 23/96 [00:03<00:13,  5.38it/s]
unique cpu indices calculation...:  25%|##5       | 24/96 [00:04<00:13,  5.36it/s]
unique cpu indices calculation...:  26%|##6       | 25/96 [00:04<00:13,  5.22it/s]
unique cpu indices calculation...:  27%|##7       | 26/96 [00:04<00:13,  5.27it/s]
unique cpu indices calculation...:  28%|##8       | 27/96 [00:04<00:12,  5.32it/s]
unique cpu indices calculation...:  29%|##9       | 28/96 [00:04<00:12,  5.25it/s]
unique cpu indices calculation...:  30%|###       | 29/96 [00:05<00:12,  5.32it/s]
unique cpu indices calculation...:  31%|###1      | 30/96 [00:05<00:12,  5.23it/s]
unique cpu indices calculation...:  32%|###2      | 31/96 [00:05<00:12,  5.26it/s]
unique cpu indices calculation...:  33%|###3      | 32/96 [00:05<00:12,  5.30it/s]
unique cpu indices calculation...:  34%|###4      | 33/96 [00:05<00:12,  5.20it/s]
unique cpu indices calculation...:  35%|###5      | 34/96 [00:06<00:11,  5.24it/s]
unique cpu indices calculation...:  36%|###6      | 35/96 [00:06<00:11,  5.14it/s]
unique cpu indices calculation...:  38%|###7      | 36/96 [00:06<00:11,  5.22it/s]
unique cpu indices calculation...:  39%|###8      | 37/96 [00:06<00:11,  5.15it/s]
unique cpu indices calculation...:  40%|###9      | 38/96 [00:06<00:11,  5.10it/s]
unique cpu indices calculation...:  41%|####      | 39/96 [00:07<00:10,  5.19it/s]
unique cpu indices calculation...:  42%|####1     | 40/96 [00:07<00:10,  5.11it/s]
unique cpu indices calculation...:  43%|####2     | 41/96 [00:07<00:10,  5.19it/s]
unique cpu indices calculation...:  44%|####3     | 42/96 [00:07<00:10,  5.36it/s]
unique cpu indices calculation...:  45%|####4     | 43/96 [00:07<00:09,  5.35it/s]
unique cpu indices calculation...:  46%|####5     | 44/96 [00:07<00:09,  5.27it/s]
unique cpu indices calculation...:  47%|####6     | 45/96 [00:08<00:09,  5.32it/s]
unique cpu indices calculation...:  48%|####7     | 46/96 [00:08<00:09,  5.39it/s]
unique cpu indices calculation...:  49%|####8     | 47/96 [00:08<00:08,  5.48it/s]
unique cpu indices calculation...:  50%|#####     | 48/96 [00:08<00:08,  5.38it/s]
unique cpu indices calculation...:  51%|#####1    | 49/96 [00:08<00:08,  5.37it/s]
unique cpu indices calculation...:  52%|#####2    | 50/96 [00:09<00:08,  5.51it/s]
unique cpu indices calculation...:  53%|#####3    | 51/96 [00:09<00:08,  5.49it/s]
unique cpu indices calculation...:  54%|#####4    | 52/96 [00:09<00:07,  5.51it/s]
unique cpu indices calculation...:  55%|#####5    | 53/96 [00:09<00:07,  5.39it/s]
unique cpu indices calculation...:  56%|#####6    | 54/96 [00:09<00:07,  5.39it/s]
unique cpu indices calculation...:  57%|#####7    | 55/96 [00:09<00:07,  5.48it/s]
unique cpu indices calculation...:  58%|#####8    | 56/96 [00:10<00:07,  5.55it/s]
unique cpu indices calculation...:  59%|#####9    | 57/96 [00:10<00:07,  5.56it/s]
unique cpu indices calculation...:  60%|######    | 58/96 [00:10<00:06,  5.48it/s]
unique cpu indices calculation...:  61%|######1   | 59/96 [00:10<00:06,  5.42it/s]
unique cpu indices calculation...:  62%|######2   | 60/96 [00:10<00:06,  5.51it/s]
unique cpu indices calculation...:  64%|######3   | 61/96 [00:11<00:06,  5.56it/s]
unique cpu indices calculation...:  65%|######4   | 62/96 [00:11<00:06,  5.59it/s]
unique cpu indices calculation...:  66%|######5   | 63/96 [00:11<00:05,  5.58it/s]
unique cpu indices calculation...:  67%|######6   | 64/96 [00:11<00:05,  5.43it/s]
unique cpu indices calculation...:  68%|######7   | 65/96 [00:11<00:05,  5.31it/s]
unique cpu indices calculation...:  69%|######8   | 66/96 [00:12<00:05,  5.40it/s]
unique cpu indices calculation...:  70%|######9   | 67/96 [00:12<00:05,  5.45it/s]
unique cpu indices calculation...:  71%|#######   | 68/96 [00:12<00:05,  5.43it/s]
unique cpu indices calculation...:  72%|#######1  | 69/96 [00:12<00:04,  5.50it/s]
unique cpu indices calculation...:  73%|#######2  | 70/96 [00:12<00:04,  5.55it/s]
unique cpu indices calculation...:  74%|#######3  | 71/96 [00:12<00:04,  5.50it/s]
unique cpu indices calculation...:  75%|#######5  | 72/96 [00:13<00:04,  5.52it/s]
unique cpu indices calculation...:  76%|#######6  | 73/96 [00:13<00:04,  5.57it/s]
unique cpu indices calculation...:  77%|#######7  | 74/96 [00:13<00:04,  5.48it/s]
unique cpu indices calculation...:  78%|#######8  | 75/96 [00:13<00:03,  5.57it/s]
unique cpu indices calculation...:  79%|#######9  | 76/96 [00:13<00:03,  5.56it/s]
unique cpu indices calculation...:  80%|########  | 77/96 [00:13<00:03,  5.50it/s]
unique cpu indices calculation...:  81%|########1 | 78/96 [00:14<00:03,  5.48it/s]
unique cpu indices calculation...:  82%|########2 | 79/96 [00:14<00:03,  5.48it/s]
unique cpu indices calculation...:  83%|########3 | 80/96 [00:14<00:02,  5.46it/s]
unique cpu indices calculation...:  84%|########4 | 81/96 [00:14<00:02,  5.34it/s]
unique cpu indices calculation...:  85%|########5 | 82/96 [00:14<00:02,  5.38it/s]
unique cpu indices calculation...:  86%|########6 | 83/96 [00:15<00:02,  5.31it/s]
unique cpu indices calculation...:  88%|########7 | 84/96 [00:15<00:02,  5.20it/s]
unique cpu indices calculation...:  89%|########8 | 85/96 [00:15<00:02,  5.10it/s]
unique cpu indices calculation...:  90%|########9 | 86/96 [00:15<00:01,  5.20it/s]
unique cpu indices calculation...:  91%|######### | 87/96 [00:15<00:01,  5.17it/s]
unique cpu indices calculation...:  92%|#########1| 88/96 [00:16<00:01,  5.24it/s]
unique cpu indices calculation...:  93%|#########2| 89/96 [00:16<00:01,  5.39it/s]
unique cpu indices calculation...:  94%|#########3| 90/96 [00:16<00:01,  5.52it/s]
unique cpu indices calculation...:  95%|#########4| 91/96 [00:16<00:00,  5.40it/s]
unique cpu indices calculation...:  96%|#########5| 92/96 [00:16<00:00,  5.50it/s]
unique cpu indices calculation...:  97%|#########6| 93/96 [00:16<00:00,  5.58it/s]
unique cpu indices calculation...:  98%|#########7| 94/96 [00:17<00:00,  5.68it/s]
unique cpu indices calculation...:  99%|#########8| 95/96 [00:17<00:00,  5.82it/s]
unique cpu indices calculation...: 100%|##########| 96/96 [00:17<00:00,  5.92it/s]
unique cpu indices calculation...: 100%|##########| 96/96 [00:17<00:00,  5.50it/s]
Elapsed time is 17.5 seconds

multi cpu indices calculation...:   0%|          | 0/96 [00:00<?, ?it/s]
multi cpu indices calculation...:   1%|1         | 1/96 [00:00<00:24,  3.83it/s]
multi cpu indices calculation...:   9%|9         | 9/96 [00:00<00:05, 15.17it/s]
multi cpu indices calculation...:  18%|#7        | 17/96 [00:01<00:04, 17.14it/s]
multi cpu indices calculation...:  26%|##6       | 25/96 [00:01<00:04, 17.36it/s]
multi cpu indices calculation...:  29%|##9       | 28/96 [00:01<00:03, 18.61it/s]
multi cpu indices calculation...:  32%|###2      | 31/96 [00:01<00:03, 19.17it/s]
multi cpu indices calculation...:  35%|###5      | 34/96 [00:02<00:03, 17.01it/s]
multi cpu indices calculation...:  38%|###7      | 36/96 [00:02<00:03, 16.76it/s]
multi cpu indices calculation...:  41%|####      | 39/96 [00:02<00:03, 14.90it/s]
multi cpu indices calculation...:  43%|####2     | 41/96 [00:02<00:04, 12.07it/s]
multi cpu indices calculation...:  45%|####4     | 43/96 [00:02<00:04, 13.00it/s]
multi cpu indices calculation...:  47%|####6     | 45/96 [00:02<00:03, 13.32it/s]
multi cpu indices calculation...:  50%|#####     | 48/96 [00:03<00:03, 14.68it/s]
multi cpu indices calculation...:  52%|#####2    | 50/96 [00:03<00:03, 14.58it/s]
multi cpu indices calculation...:  55%|#####5    | 53/96 [00:03<00:02, 16.01it/s]
multi cpu indices calculation...:  58%|#####8    | 56/96 [00:03<00:02, 17.81it/s]
multi cpu indices calculation...:  60%|######    | 58/96 [00:03<00:02, 13.73it/s]
multi cpu indices calculation...:  64%|######3   | 61/96 [00:03<00:02, 15.95it/s]
multi cpu indices calculation...:  67%|######6   | 64/96 [00:04<00:02, 15.87it/s]
multi cpu indices calculation...:  69%|######8   | 66/96 [00:04<00:02, 14.97it/s]
multi cpu indices calculation...:  72%|#######1  | 69/96 [00:04<00:01, 17.52it/s]
multi cpu indices calculation...:  75%|#######5  | 72/96 [00:04<00:01, 15.44it/s]
multi cpu indices calculation...:  77%|#######7  | 74/96 [00:04<00:01, 14.39it/s]
multi cpu indices calculation...:  80%|########  | 77/96 [00:04<00:01, 17.07it/s]
multi cpu indices calculation...:  82%|########2 | 79/96 [00:05<00:01, 13.87it/s]
multi cpu indices calculation...:  84%|########4 | 81/96 [00:05<00:01, 11.89it/s]
multi cpu indices calculation...:  89%|########8 | 85/96 [00:05<00:00, 15.42it/s]
multi cpu indices calculation...:  91%|######### | 87/96 [00:05<00:00, 16.04it/s]
multi cpu indices calculation...:  93%|#########2| 89/96 [00:05<00:00, 14.70it/s]
multi cpu indices calculation...:  97%|#########6| 93/96 [00:05<00:00, 19.81it/s]
multi cpu indices calculation...: 100%|##########| 96/96 [00:06<00:00, 20.80it/s]
multi cpu indices calculation...: 100%|##########| 96/96 [00:06<00:00, 15.88it/s]
Elapsed time is 6.0 seconds

Total running time of the script: ( 0 minutes 23.615 seconds)

Gallery generated by Sphinx-Gallery