ivy.dev_unify_iter(xs, dev_str, mode, axis=0, transpose=False)[source]

Unify elements of the iterbale xs to a single target device.

  • xs (iterable of any) – The iterable of items to unify.

  • dev_str (str) – The device to unify the elements of the iterable 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.

  • transpose (bool, optional) – Whether to transpose the first and second dimensions of the iterator. Default is False.


iterable with each element unified to a single target devices

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty