assemble_tucker_variation_jets#

t3toolbox.backend.sampling_derivatives.assemble_tucker_variation_jets(ztildes, dxi_tildes, ww, pp, etas, n_probe, sum_over_probes, chunk_size=100)#
def assemble_tucker_variation_jets(
        ztildes, dxi_tildes, ww, pp, etas, n_probe, sum_over_probes,
        chunk_size: typ.Optional[int] = 100,   # W-chunk size; None (or >= W) -> dense. See docs/chunking.md
) -> NDArray:

Assemble the Tucker variation gradient (standard W-chunked form; dense reference assemble_tucker_variation_jets_trs()). The milder assembly (two legs nO,N – the dense gradient is a few GB, not the tt-core’s hundreds), chunked over W with the same reducer seam (add if summed, concat if kept) for a uniform chunked-assembly interface. The only twist: ww/pp have no order axis, so W sits at a per-operand axis (2 for the order-carrying jets, 1 for ww/pp). chunk_size None / ragged / multi-W / small W -> runs the dense assembly directly (no chunking).

Parameters:

chunk_size (t3toolbox.backend.common.typ.Optional[int])

Return type:

NDArray