MCPcopy Create free account
hub / github.com/NVIDIA/DALI / test_tensor_cpu_from_numpy

Function test_tensor_cpu_from_numpy

dali/test/python/test_backend_impl_gpu.py:312–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

310
311
312def test_tensor_cpu_from_numpy():
313 def create_tmp(idx):
314 a = np.full((4, 4), idx)
315 return tensors.TensorCPU(a, "")
316
317 out = [create_tmp(i) for i in range(4)]
318 for i, t in enumerate(out):
319 np.testing.assert_array_equal(np.array(t), np.full((4, 4), i))
320
321
322def test_tensor_list_cpu_from_numpy():

Callers

nothing calls this directly

Calls 1

create_tmpFunction · 0.70

Tested by

no test coverage detected