Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/d/a/dana-0.5.0/dana/tests/learning.py   dana(Download)
    def test_1(self):
        kernel = np.ones(1)
        C = SparseConnection(np.ones(3), np.ones(3), kernel,
                             equation = 'dW/dt = 1')
        C.evaluate(dt=.1)
    def test_2(self):
        kernel = np.ones(3)*np.NaN
        C = SparseConnection(np.ones(3), np.ones(3), kernel,
                             equation = 'dW/dt = 1')
        C.evaluate(dt=.1)
        C = SparseConnection(np.ones(3), np.ones(3), kernel,
                             equation = 'dW/dt = 1')
        C.evaluate(dt=0.1)
        assert np_equal(C.weights, np.array([[0,1,0],
                                             [1,0,1],