def setUp(self): x, y = N.mgrid[-10:10:11j, -10:10:12j] self.x, self.y = x, y dims = (x.shape[0], y.shape[1]) self.s = s = N.ones(dims, float) src = sources.MArray2DSource() src.reset(x=x, y=y, scalars=s) self.src = src
def setUp(self): x = None y = None self.x, self.y = x, y if x is not None and y is not None: dims = (x.shape[0], y.shape[1]) else: dims = (10, 10) self.s = s = N.ones(dims, float) src = sources.MArray2DSource() src.reset(x=x, y=y, scalars=s) self.src = src