lookup_array_backend
- odl.lookup_array_backend(impl: str) ArrayBackend
Convenience function for getting an
ArrayBackendfrom animplargument. This is helpful to both ensure that a backend actually exists and to retrieve it.Parameters
- implstr
backend identifier
Examples
>>> lookup_array_backend('numpy') ArrayBackend(impl=numpy) >>> lookup_array_backend('something_else') Traceback (most recent call last): KeyError: "The implementation something_else is not supported by ODL. Please select a backend in ['numpy']" >>> lookup_array_backend(72) Traceback (most recent call last): AssertionError: f"The impl parameter must be a string, got int"