Tensor.to_impl

Tensor.to_impl(impl: str)[source]

Return a copy of this element with the same values stored using a different array backend.

Parameters

impl :

Identifier of the target backend. Must correspond to a registered ArrayBackend. See tensor_space_impl_names for available options. Both impl and the implementation of the original space must support the same device, most typically 'cpu'. If you want to use GPU storage, use a separate call to Tensor.to_device.

Returns

newelemTensor

Version of this element with its data array using the desired backend.