a = at.scalar('a')
b = a + 1; b.name = 'b'
c = b + 1; c.name = 'c'
fg = FunctionGraph([a], [c], clone=False)
fg.replace(b, at.sin(a))
aesara.tensor
?
numpy
in some cases?
at.sqrt(x + at.pi)
or at.switch(..., ..., at.inf)
ufunc
s, then that's already covered by Aesara's Composite
Op
Elemwise
numpy.vectorize
-like helper function in Aesara
jax.vmap
doing anything particularly special
numpy.vectorize
clone
numpy.vectorize
can handle non-scalar functions
signature
with explicit dimensions for each input
jax.vmap
looks like an clone of numpy.vectorize
numpy.vectorize
just constructs vmap
calls
numpy.vectorize
helper function
signature
keyword:import numpy as np
def dirichlet_logp(a, x):
return st.dirichlet(a).logpdf(x)
vfunc = np.vectorize(dirichlet_logp, signature='(n),(n)->()')
vfunc(np.arange(1, 10).reshape(3, 3), np.ones(3)/3)
RandomVariable
class interface