PyTensor utils#

compile(inputs, outputs[, random_seed, mode])

Use pytensor.function with specialized pymc rewrites always enabled.

gradient(f[, vars])

hessian(f[, vars, negate_output])

hessian_diag(f[, vars, negate_output])

jacobian(f[, vars])

inputvars(a)

Get the inputs into PyTensor variables.

cont_inputs(a)

Get the continuous inputs into PyTensor variables.

floatX(X)

Convert a PyTensor tensor or numpy array to pytensor.config.floatX type.

intX(X)

Convert a pytensor tensor or numpy array to pytensor.tensor.int32 type.

constant_fold(xs[, raise_not_constant])

Use constant folding to get constant values of a graph.

CallableTensor(tensor)

Turns a symbolic variable with one input into a function that returns symbolic arguments with the one variable replaced with the input.

join_nonshared_inputs(point, outputs, inputs)

Create new outputs and input TensorVariables where the non-shared inputs are joined in a single raveled vector input.

make_shared_replacements(point, vars, model)

Make shared replacements for all other variables than the ones passed.

convert_data(data)