()
| 6086 | |
| 6087 | |
| 6088 | def test_to_backend(): |
| 6089 | # Test that `Array.to_backend` works as expected |
| 6090 | with dask.config.set({"array.backend": "numpy"}): |
| 6091 | # Start with numpy-backed array |
| 6092 | x = da.ones(10) |
| 6093 | assert isinstance(x._meta, np.ndarray) |
| 6094 | |
| 6095 | # Default `to_backend` shouldn't change data |
| 6096 | assert_eq(x, x.to_backend()) |
| 6097 | |
| 6098 | # Moving to a "missing" backend should raise an error |
| 6099 | with pytest.raises(ValueError, match="No backend dispatch registered"): |
| 6100 | x.to_backend("missing") |
| 6101 | |
| 6102 | |
| 6103 | def test_from_array_copies(): |
nothing calls this directly
no test coverage detected