Move an Array collection to a new backend Parameters ---------- x : Array The input Array collection. backend : str, Optional The name of the new backend to move to. The default is the current "array.backend" configuration. Returns ------- dask.A
(x: Array, backend: str | None = None, **kwargs)
| 33 | |
| 34 | |
| 35 | def to_backend(x: Array, backend: str | None = None, **kwargs): |
| 36 | """Move an Array collection to a new backend |
| 37 | |
| 38 | Parameters |
| 39 | ---------- |
| 40 | x : Array |
| 41 | The input Array collection. |
| 42 | backend : str, Optional |
| 43 | The name of the new backend to move to. The default |
| 44 | is the current "array.backend" configuration. |
| 45 | |
| 46 | Returns |
| 47 | ------- |
| 48 | dask.Array |
| 49 | A new Array collection with the backend specified |
| 50 | by ``backend``. |
| 51 | """ |
| 52 | # Get desired backend |
| 53 | backend = backend or array_creation_dispatch.backend |
| 54 | # Check that "backend" has a registered entrypoint |
| 55 | backend_entrypoint = array_creation_dispatch.dispatch(backend) |
| 56 | # Call `ArrayBackendEntrypoint.to_backend` |
| 57 | return backend_entrypoint.to_backend(x, **kwargs) |
| 58 | |
| 59 | |
| 60 | def empty_like(a, dtype=None, order="C", chunks=None, name=None, shape=None): |
no test coverage detected