Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 36f670b8 authored by hhakim's avatar hhakim
Browse files

Add a test for pyfaust.Faust.factors when the Faust contains BSRMat-s.

parent 3dcc8abd
No related branches found
No related tags found
No related merge requests found
Pipeline #834051 skipped
...@@ -811,6 +811,18 @@ class TestFaustPy(unittest.TestCase): ...@@ -811,6 +811,18 @@ class TestFaustPy(unittest.TestCase):
b = b.toarray() b = b.toarray()
np.allclose(a,b) np.allclose(a,b)
def test_bsr_get_fact(self):
print("test_bsr_get_fact")
from pyfaust import rand_bsr, Faust
from numpy import allclose
nfacs = 5
F = rand_bsr(15, 15, 3, 5, nfacs)
for i in range(nfacs):
bf = F.factors(i)
G = Faust(bf)
bf2 = G.factors(0)
self.assertTrue(allclose(bf.toarray(), bf2.toarray()))
class TestFaustPyCplx(TestFaustPy): class TestFaustPyCplx(TestFaustPy):
def setUp(self): def setUp(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment