(np_array)
| 492 | |
| 493 | |
| 494 | def zerocopy_from_numpy(np_array): |
| 495 | # NOTE: not zerocopy |
| 496 | # This assumes tensor should be on cpu |
| 497 | with tf.device("/cpu:0"): |
| 498 | t = tf.convert_to_tensor(np_array) |
| 499 | return t |
| 500 | |
| 501 | |
| 502 | def zerocopy_to_dgl_ndarray(data): |
no test coverage detected