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

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

src/d/a/dana-0.5.0/dana/tests/group.py   dana(Download)
import unittest
import numpy as np
from dana import Group
from tools import np_equal
from dana import ConnectionError
    def setUp(self):
        self.Z = Group()
    def test_shape(self):
        assert self.Z.shape == ()
    def test_dtype(self):
    def setUp(self):
        self.Z = Group((3,5))
    def test_shape(self):
        assert self.Z.shape == (3,5)
    def test_size(self):
    def setUp(self):
        self.Z = Group((3,5), fill=1.2)
    def test_fill(self):
        assert 1-(self.Z.f0-np.ones((3,5))*1.2).all()
 
class GroupMask(unittest.TestCase):
    def setUp(self):
        self.Z = Group((3,3))

src/d/a/dana-0.5.0/dana/tests/network.py   dana(Download)
import numpy as np
from tools import np_equal
from dana import Network, Group, Clock
from dana import SparseConnection, DenseConnection, SharedConnection
 
class TestEvaluationOrder(unittest.TestCase):
    def test_1(self):
        A = Group(1, "V = B['V']")
        A[...] = 1
        B = Group(1, "V = A['V']")
    def test_1(self):
        A = Group(1, "V = B['V']")
        A[...] = 1
        B = Group(1, "V = A['V']")
        B[...] = 2

src/d/a/dana-0.5.0/dana/tests/learning.py   dana(Download)
import scipy.sparse as sp
from tools import np_equal
from dana import Group, zeros, ones
from dana import DenseConnection, SparseConnection