Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_allrap(test_jobs):
vecs = spa.grids.load_t_design(degree=5)
hull = spa.decoder.LoudspeakerSetup(*vecs.T)
hull.ambisonics_setup(update_hull=False)
src = np.random.randn(1000, 3)
gains_r = spa.decoder.allrap(src, hull, jobs_count=1)
gains_t = spa.decoder.allrap(src, hull, jobs_count=test_jobs)
assert_allclose(gains_t, gains_r)
def test_allrap2(test_jobs):
vecs = spa.grids.load_t_design(degree=5)
hull = spa.decoder.LoudspeakerSetup(*vecs.T)
hull.ambisonics_setup(update_hull=False)
src = np.random.randn(1000, 3)
gains_r = spa.decoder.allrap2(src, hull, jobs_count=1)
gains_t = spa.decoder.allrap2(src, hull, jobs_count=test_jobs)
assert_allclose(gains_t, gains_r)