ivy.to_node(x: Union[ivy.Array, ivy.NativeArray], node_str: Optional[str] = None, f: Optional[ivy.Framework] = None) → Union[ivy.Array, ivy.NativeArray][source]

Move the input array x to the desired node, specified by node string.

  • x (array) – Array to move onto the node.

  • node_str (str, optional) – node to move the array to ‘cuda:0’, ‘cuda:1’, ‘cpu’ etc. Keep same node if None.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


The array x, but now placed on the target node.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty