ArrayBackendChange
- class odl.ArrayBackendChange(domain_impl: str, range_impl: str, subspace_index: int | list[int] = [])
Bases:
AdapterOperatorA pseudo-operator that transfers arrays from one backend to another. Both backends must support the same device (this can mean you first need to use
DeviceChangeto transfer to'cpu', which should be supported by all backends).Further reading: Switching between array backends
- __init__(domain_impl: str, range_impl: str, subspace_index: int | list[int] = [])[source]
Create an operator tying two equivalent spaces with different storage together.
Parameters
- domain_impl, range_impl
str Backend specifiers such as
'numpy'or'pytorch'. Which ones are supported depends on the installed packages.
- domain_impl, range_impl