def make_node(self, pvals, unis, n=1): pvals = aet.as_tensor_variable(pvals) unis = aet.as_tensor_variable(unis) if pvals.ndim != 2: raise NotImplementedError("pvals ndim should be 2", pvals.ndim) if unis.ndim != 1: raise NotImplementedError("unis ndim should be 1", unis.ndim) if self.odtype == "auto": odtype = pvals.dtype else: odtype = self.odtype out = aet.tensor(dtype=odtype, broadcastable=pvals.type.broadcastable) return Apply(self, [pvals, unis, as_scalar(n)], [out])
def make_node(self, pvals, unis, n): assert pvals.dtype == "float32" assert unis.dtype == "float32" ctx_name = infer_context_name(pvals, unis) pvals = as_gpuarray_variable(pvals, ctx_name) unis = as_gpuarray_variable(unis, ctx_name) if pvals.ndim != 2: raise NotImplementedError("pvals ndim should be 2", pvals.ndim) if unis.ndim != 1: raise NotImplementedError("unis ndim should be 1", unis.ndim) if self.odtype == "auto": odtype = "int64" else: odtype = self.odtype assert odtype == "int64", odtype br = (pvals.broadcastable[1], pvals.broadcastable[0]) out = GpuArrayType(broadcastable=br, dtype=odtype, context_name=ctx_name)() return Apply(self, [pvals, unis, as_scalar(n)], [out])
def make_node(self, a, b): return Apply(self, [aes.as_scalar(a), aes.as_scalar(b)], [aes.float64()])
def make_node(self, input): input = aes.as_scalar(input) output = input.type() return Apply(self, [input], [output])
def make_node(self, val): from aesara import Apply from aesara.scalar import as_scalar val = as_scalar(val).astype("uint64") return Apply(self, [val], [self.rtype()])