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

Function create_numpy_file

dali/test/python/reader/test_numpy.py:68–74  ·  view source on GitHub ↗
(filename, shape, typ, fortran_order)

Source from the content-addressed store, hash-verified

66
67
68def create_numpy_file(filename, shape, typ, fortran_order):
69 # generate random array
70 arr = rng.random_sample(shape) * 10.0
71 arr = arr.astype(typ)
72 if fortran_order:
73 arr = np.asfortranarray(arr)
74 np.save(filename, arr)
75
76
77def delete_numpy_file(filename):

Callers 9

test_dim_mismatchFunction · 0.70
test_type_mismatchFunction · 0.70
test_numpy_reader_aliasFunction · 0.70
test_numpy_reader_roiFunction · 0.70
test_pad_last_sampleFunction · 0.70
test_shufflingFunction · 0.70

Calls 2

random_sampleMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected