def test_infer_shape(self): for format in sparse.sparse_formats: self._compile_and_check( [self.x[format]], [poisson(self.x[format])], [self.a[format]], self.op_class, )
def test_op(self): for format in sparse.sparse_formats: f = theano.function([self.x[format]], poisson(self.x[format])) tested = f(self.a[format]) assert tested.format == format assert tested.dtype == self.a[format].dtype assert np.allclose(np.floor(tested.data), tested.data) assert tested.shape == self.a[format].shape
def test_op(self): for format in sparse.sparse_formats: f = theano.function([self.x[format]], poisson(self.x[format])) tested = f(self.a[format]) assert tested.format == format assert tested.dtype == self.a[format].dtype assert numpy.allclose(numpy.floor(tested.data), tested.data) assert tested.shape == self.a[format].shape
def test_infer_shape(self): for format in sparse.sparse_formats: self._compile_and_check([self.x[format]], [poisson(self.x[format])], [self.a[format]], self.op_class)