(self, ctx)
| 202 | assert lib.ggml_get_i32_1d(t, 0) == 42 |
| 203 | |
| 204 | def test_copy_1d(self, ctx): |
| 205 | t1 = lib.ggml_new_tensor_1d(ctx, lib.GGML_TYPE_F32, 10) |
| 206 | t2 = lib.ggml_new_tensor_1d(ctx, lib.GGML_TYPE_F32, 10) |
| 207 | a = np.arange(10, dtype=np.float32) |
| 208 | copy(a, t1) |
| 209 | copy(t1, t2) |
| 210 | assert np.allclose(a, numpy(t2)) |
| 211 | assert np.allclose(numpy(t1), numpy(t2)) |
| 212 | |
| 213 | class TestGraph: |
| 214 |
nothing calls this directly
no test coverage detected