ivy.nested_multi_map(func, nests, index_chains=None, to_apply=True, prune_unapplied=False, index_chain='', config=None, to_ivy=True)[source]#

Apply function to all array values from a collection of identically structured ivy arrays.

  • func (Callable) – Function to apply to each nest entry.

  • nest – nests to map.

  • index_chains (default: None) – The key-chains to apply or not apply the method to. Default is None.

  • to_apply (default: True) – If True, the method will be applied to index_chains, otherwise index_chains will be skipped. Default is True.

  • prune_unapplied (default: False) – Whether to prune index_chains for which the function was not applied, otherwise the leftmost nest value is used. Default is False.

  • index_chain (default: '') – Chain of keys for this dict entry (Default value = ‘’)

  • config (default: None) – The configuration for the nests. Default is the same as nest0.

  • to_ivy (default: True) – convert the output to ivy_arrays. Default is True


nest containing the result of the function. The structure of the output is the same as the input with the result of the function applied to each applicable leaf and the value at that leaf in the first nest for a non-applicable leaf if prune_unapplied is False else unapplied leaves are pruned.