Home
last modified time | relevance | path

Searched refs:rng (Results 1 – 8 of 8) sorted by relevance

/liblc3-3.7.0-3.6.0/test/
Dattdet.py104 def check_enabling(rng, dt): argument
115 initial_state(), 2 * rng.random(T.NS[dt][sr]+6) - 1)
121 def check_unit(rng, dt, sr): argument
135 x = ((2 * rng.random(ns)) - 1) * (2 ** 8 - 1)
136 x[(ns * rng.random()).astype(int)] *= 2 ** 7
170 rng = np.random.default_rng(1234)
174 ok and check_enabling(rng, dt)
178 ok = ok and check_unit(rng, dt, sr)
Dspec.py574 def check_estimate_gain(rng, dt, sr): argument
582 x = rng.random(ne) * i * 1e2
584 nbytes = 20 + int(rng.random() * 100)
585 nbits_budget = 8 * nbytes - int(rng.random() * 100)
586 nbits_off = rng.random() * 10
587 g_off = 10 - int(rng.random() * 20)
600 def check_quantization(rng, dt, sr): argument
609 x = rng.random(ne) * 1e2
610 nbytes = 20 + int(rng.random() * 30)
621 def check_compute_nbits(rng, dt, sr): argument
[all …]
Denergy.py43 def check_unit(rng, dt, sr): argument
50 x = (2 * rng.random(T.NS[dt][sr])) - 1
79 rng = np.random.default_rng(1234)
85 ok = ok and check_unit(rng, dt, sr)
Dmdct.py94 def check_forward_unit(rng, dt, sr): argument
100 x = (2 * rng.random(ns)) - 1
134 def check_inverse_unit(rng, dt, sr): argument
140 x = (2 * rng.random(ns)) - 1
185 rng = np.random.default_rng(1234)
191 ok = ok and check_forward_unit(rng, dt, sr)
192 ok = ok and check_inverse_unit(rng, dt, sr)
Dbwdet.py94 def check_unit(rng, dt, sr): argument
106 e = 20 + 100 * rng.random(64)
150 rng = np.random.default_rng(1234)
155 ok = ok and check_unit(rng, dt, sr)
Dsns.py460 def check_analysis(rng, dt, sr): argument
467 x = rng.random(T.NE[dt][sr]) * 1e4
468 e = rng.random(min(len(x), 64)) * 1e10
484 def check_synthesis(rng, dt, sr): argument
492 synthesis.ind_lf = rng.integers(0, 32)
493 synthesis.ind_hf = rng.integers(0, 32)
495 shape = rng.integers(0, 4)
499 synthesis.gain = rng.integers(0, [ 2, 4, 4, 8 ][shape])
500 synthesis.idx_a = rng.integers(0, sz_shape_a, endpoint=True)
501 synthesis.ls_a = bool(rng.integers(0, 1, endpoint=True))
[all …]
Dtns.py302 def check_analysis(rng, dt, bw): argument
310 x = rng.random(T.NE[dt][bw]) * 1e2
333 def check_synthesis(rng, dt, bw): argument
340 x = rng.random(T.NE[dt][bw]) * 1e2
343 synthesis.rc_order = rng.integers(0, 9, 2)
344 synthesis.rc = rng.integers(0, 17, 16).reshape(2, 8)
426 rng = np.random.default_rng(1234)
431 ok = ok and check_analysis(rng, dt, sr)
432 ok = ok and check_synthesis(rng, dt, sr)
Dltpf.py442 def check_resampler(rng, dt, sr): argument
456 x = ((2 * rng.random(ns)) - 1) * (2 ** 15 - 1)
494 def check_analysis(rng, dt, sr): argument
527 def check_synthesis(rng, dt, sr): argument
540 pitch_present = bool(rng.integers(0, 10) >= 1)
544 synthesis.active[0] = bool(rng.integers(0, 5) >= 1)
545 synthesis.pitch_index = rng.integers(0, 512)
551 x = rng.random(ns) * 1e4
552 nbytes = rng.integers(10*(2+sr), 10*(6+sr))
644 rng = np.random.default_rng(1234)
[all …]