import numpy as np
from dascore.utils.array_api import to_backend
assert isinstance(to_backend(np.array([1, 2]), "numpy"), np.ndarray)to_backend
to_backend(
array: Any ,
backend: str ,
)-> ‘Any’
Return an array on the array library a name says.
Parameters
| Parameter | Description |
|---|---|
| array | An array in memory, on any backend. |
| backend |
The name of the array library, asbackend_name reports it.
|
Raises
ParameterError If no array library of that name can be imported.