def test_6(self): assert np_equal( Connection(ones(5), ones(3), ones(3), fft=False).output(), array([2, 3, 2]))
def test_7(self): assert np_equal( Connection(ones(3), ones(3), array([1, NaN, 1]), fft=False).output(), array([1, 2, 1]))
def test_10(self): C = Connection(ones((3,3)), ones((3,3)), ones((1,1)),fft=True) assert np_equal(C[1,1], array([[NaN, NaN, NaN], [NaN, 1, NaN], [NaN, NaN, NaN]]))
def test_7(self): assert np_equal( Connection(ones((3, 3)), ones((3, 3)), array([[1, 1, 1], [1, NaN, 1], [1, 1, 1]])).output(), array([[3, 5, 3], [5, 8, 5], [3, 5, 3]]))
def test_3(self): assert np_equal( Connection(ones((5,5)), ones((3,3)), ones((1,1)),fft=True).output(), ones((3,3)))
def test_8(self): assert np_equal( Connection(ones((3,3)), ones((3,3)), ones((3,3))*NaN,fft=True).output(), zeros((3,3)) )
def test_11(self): assert np_equal( Connection(ones(3), ones(3), ones(3), toric=True).output(), ones(3) * 3)
def test_11_bis(self): assert np_equal( Connection(ones(3), ones(3), ones(20), toric=True, fft=False).output(), ones(3) * 3)
def test_5(self): assert np_equal( Connection(ones(3), ones(5), ones(3)).output(), array([2, 2, 3, 2, 2]))
def test_9(self): assert np_equal( Connection(ones(3), ones(3), ones((3, 3))).output(), 3 * ones(3))
def test_2(self): assert np_equal( Connection(ones(3), ones(5), ones(1)).output(), ones(5))
def test_11_ter(self): assert np_equal( Connection(ones((3, 3)), ones((3, 3)), ones((1, 20)), toric=True).output(), ones((3, 3)) * 3)
def test_11_bis(self): assert np_equal( Connection(ones((3, 3)), ones((3, 3)), ones((20, 20)), toric=True).output(), ones((3, 3)) * 9)
def test_8(self): assert np_equal( Connection(ones(3), ones(3), array([NaN, NaN, NaN]), fft=False).output(), zeros(3))
def test_12(self): Z = ones(5) K = arange(5) C = Connection(Z, Z, K, fft=False) assert np_equal(C[0], array([2, 3, 4, NaN, NaN]))
def test_10(self): C = Connection(ones(3), ones(3), ones(1), fft=False) assert np_equal(C[0], array([1, NaN, NaN])) assert np_equal(C[1], array([NaN, 1, NaN])) assert np_equal(C[2], array([NaN, NaN, 1]))
def test_13(self): Z = ones(5) K = arange(5) C = Connection(Z, Z, K, fft=False) assert np_equal(C[2], K)
def test_14(self): Z = ones(5) K = arange(5) C = Connection(Z,Z,K,fft=True) assert np_equal(C[4], array([NaN,NaN,0,1,2]))
def test_1(self): assert np_equal( Connection(ones((3, 3)), ones((3, 3)), ones((1, 1)), fft=False).output(), ones((3, 3)))
def test_6(self): assert np_equal( Connection(ones((5,5)), ones((3,3)), ones((3,3)),fft=True).output(), array([[4,6,4], [6,9,6], [4,6,4]]))
def test_16(self): Z = ones((5, 5)) K = arange(5 * 5).reshape((5, 5)) C = Connection(Z, Z, K, fft=False) assert np_equal(C[2, 2], K)
def test_9(self): assert np_equal( Connection(ones((3,3)), ones((3,3)), ones((9,9)),fft=True).output(), 9*ones((3,3)))
def test_3(self): assert np_equal( Connection(ones(5), ones(3), ones(1), fft=False).output(), ones(3))
def test_11(self): assert np_equal(Connection(ones((3,3)), ones((3,3)), ones((3,3)), toric=True,fft=True).output(), ones((3,3))*9)
def test_4(self): assert np_equal( Connection(ones((3, 3)), ones((3, 3)), ones((3, 3))).output(), array([[4, 6, 4], [6, 9, 6], [4, 6, 4]]))