()
| 5862 | |
| 5863 | |
| 5864 | def test_to_backend(): |
| 5865 | # Test that `Array.to_backend` works as expected |
| 5866 | with dask.config.set({"array.backend": "numpy"}): |
| 5867 | # Start with numpy-backed array |
| 5868 | x = da.ones(10) |
| 5869 | assert isinstance(x._meta, np.ndarray) |
| 5870 | |
| 5871 | # Default `to_backend` shouldn't change data |
| 5872 | assert_eq(x, x.to_backend()) |
| 5873 | |
| 5874 | # Moving to a "missing" backend should raise an error |
| 5875 | with pytest.raises(ValueError, match="No backend dispatch registered"): |
| 5876 | x.to_backend("missing") |
| 5877 | |
| 5878 | |
| 5879 | def test_from_array_copies(): |
nothing calls this directly
no test coverage detected