def setUp(self): # sheet to test. As it is, its activity matrix dimension is (3,2) Sheet.nominal_density = 1 Sheet.nominal_bounds = BoundingBox(points=((-1, -2), (1, 1))) test_sheet = Sheet() # simple activity arrays use to update the feature maps self.a1 = array([[1, 1], [1, 1], [1, 1]]) self.a2 = array([[3, 3], [3, 3], [3, 3]]) self.a3 = array([[0, 1], [0, 1], [0, 1]]) # object to test for non-cyclic distributions self.fm1 = DistributionMatrix(test_sheet.shape, axis_range=(0.0, 1.0), cyclic=False) self.fm1.update(self.a1, 0.5) # object to for cyclic distributions self.fm2 = DistributionMatrix(test_sheet.shape, axis_range=(0.0, 1.0), cyclic=True) self.fm2.update(self.a1, 0.5)
def setUp(self): self.s = Simulation() self.sheet1 = Sheet() self.sheet2 = Sheet()
def setUp(self): self.s = Sheet() self.s.activity = Numeric.array([[1, 2], [3, 4]]) self.s2 = Sheet() self.s2.activity = Numeric.array([[4, 3], [2, 1]])