from dascore.utils.array_api import parse_backend
assert parse_backend("numpy") == (False, "numpy")
assert parse_backend("lazy") == (True, "numpy")
assert parse_backend("LazyArray[jax]") == (True, "jax")parse_backend
parse_backend(
backend: str ,
)-> ‘tuple[bool, str]’
Return whether a backend name is lazy, and the array library it names.
Parameters
| Parameter | Description |
|---|---|
| backend |
An array library by the namebackend_name reports,such as "numpy" or "jax", or a lazy backend: "LazyArray"or its alias "lazy", with the library each chunk is computed onin brackets, NumPy when none is given. |