unify_nest

ivy.unify_nest(args: Type[ivy.core.multi_node.MultiNode], kwargs: Type[ivy.core.multi_node.MultiNode], node_str, mode, axis=0, max_depth=1)[source]

Unify the input nested arguments, which consist of sub-arrays spread across arbitrary nodes, to unified arrays on the single target node.

Parameters
  • args (MultiNode) – The nested positional arguments to unify.

  • kwargs (MultiNode) – The nested keyword arguments to unify.

  • node_str (str) – The node to unify the nested arguments to.

  • mode (str) – The mode by which to unify, must be one of [ concat | mean | sum ]

  • axis (int, optional) – The axis along which to concattenate the sub-arrays. Default is 0.

  • max_depth (int, optional) – The maximum nested depth to reach. Default is 1. Increase this if the nest is deeper.

Returns

nested arguments unified to the target node


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty