(self, Var)
| 3128 | |
| 3129 | @requires_cupy |
| 3130 | def test_from_cupy(self, Var): |
| 3131 | if Var is IndexVariable: |
| 3132 | pytest.skip("cupy in default indexes is not supported at the moment") |
| 3133 | import cupy as cp |
| 3134 | |
| 3135 | arr = np.array([1, 2, 3]) |
| 3136 | v = Var("x", cp.array(arr)) |
| 3137 | |
| 3138 | assert_identical(v.as_numpy(), Var("x", arr)) |
| 3139 | np.testing.assert_equal(v.to_numpy(), arr) |
| 3140 | |
| 3141 | @requires_dask |
| 3142 | @requires_pint |
nothing calls this directly
no test coverage detected