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

Function m

dali/test/python/operator_1/test_coord_transform.py:253–258  ·  view source on GitHub ↗
(sample_desc)

Source from the content-addressed store, hash-verified

251 return range(rng.randint(1, limit) + 1)
252
253 def m(sample_desc):
254 angles = np_rng.uniform(-np.pi, np.pi, 2)
255 scales = np_rng.uniform(0, 5, 2)
256 c = np.cos(angles[0])
257 s = np.sin(angles[1])
258 return np.array([[c * scales[0], -s], [s, c * scales[1]]], dtype=np.float32)
259
260 def t(sample_desc):
261 return np.float32(np_rng.uniform(-100, 250, 2))

Callers 5

TestAffineFunction · 0.85
mtFunction · 0.85
mat.hFile · 0.85

Calls 2

cosMethod · 0.80
sinMethod · 0.80

Tested by

no test coverage detected