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
ndim_supp
and ndims_params
Elemwise
is constrained to scalar functions, of course
Composite
, since it's just an optimization for Elemwise
)
aehmc
jax.vmap
for the JAX backend
numpy.vectorize
/for
-loops in the Python case
for
-loops as well
RandomVariable
work