OptimizationVariables.variable_slice#

OptimizationVariables.variable_slice(name)[source]#

Return the symbolic slice of the flat vector for variable name.

This is a node in the PyTensor graph, not a buffer: it carries no values and nothing is copied or mutated. A variable spanning the whole vector gets the flat input itself; otherwise an isel node over its contiguous segment.