()
| 6049 | |
| 6050 | |
| 6051 | def test_to_backend(): |
| 6052 | # Test that `Array.to_backend` works as expected |
| 6053 | with dask.config.set({"array.backend": "numpy"}): |
| 6054 | # Start with numpy-backed array |
| 6055 | x = da.ones(10) |
| 6056 | assert isinstance(x._meta, np.ndarray) |
| 6057 | |
| 6058 | # Default `to_backend` shouldn't change data |
| 6059 | assert_eq(x, x.to_backend()) |
| 6060 | |
| 6061 | # Moving to a "missing" backend should raise an error |
| 6062 | with pytest.raises(ValueError, match="No backend dispatch registered"): |
| 6063 | x.to_backend("missing") |
| 6064 | |
| 6065 | |
| 6066 | def test_from_array_copies(): |
nothing calls this directly
no test coverage detected