TensorSpace.to_impl

TensorSpace.to_impl(impl)[source]

Return a copy of this space using a different array-backend. Mathematically this is the same space, but the computational performance can be very different.

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 TensorSpace.to_device.

Returns

newspaceTensorSpace

Version of this space with selected backend.