Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 38a78b12 authored by hhakim's avatar hhakim
Browse files

Add unit tests for pyfaust.lazylinop.diag.

parent 97878f42
Branches
Tags
No related merge requests found
...@@ -268,5 +268,18 @@ class TestLazyLinearOpEye(TestLazyLinearOpFaust): ...@@ -268,5 +268,18 @@ class TestLazyLinearOpEye(TestLazyLinearOpFaust):
self.lop3 = eye(self.lop.shape[1], self.lop.shape[0], k=-2) self.lop3 = eye(self.lop.shape[1], self.lop.shape[0], k=-2)
self.lop3A = self.lop3.toarray() self.lop3A = self.lop3.toarray()
class TestLazyLinearOpDiag(TestLazyLinearOpFaust):
def setUp(self):
from pyfaust.lazylinop import diag
v = np.random.rand(10)
self.lop = diag(v, k=2)
self.lopA = self.lop.toarray()
self.lop2 = diag(v, k=-2)
self.lop2A = self.lop2.toarray()
self.lop3 = diag(v, k=2)
self.lop3A = self.lop3.toarray()
if '__main__' == __name__: if '__main__' == __name__:
unittest.main() unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment