sumsq_over_probes#
- t3toolbox.backend.fitting.sumsq_over_probes(zz, n_w)#
def sumsq_over_probes( zz: typ.Union[typ.Sequence[NDArray], NDArray], # ragged len=d (elm W+C+(Ni,)) OR packed (d,)+W+C+(N,) n_w: int, # number of leading sample-stack (W) axes ) -> NDArray: # sum of squares over W and the free mode, summed over d, keep C
The
‖·‖²reduction for the vector-outputprobekind: sum over the leadingn_wsample axes and the trailing free mode, keeping the frame stackC, summed over thedprobes. Mirrorszz’s packedness: a raggedlen=dsequence loops overd(eachz_iisW+C+(Ni,)); a packed(d,)+W+C+(N,)array sumsd+W+ the padded modeNin one op (the free-mode padding is a zeroed prefix, so it contributes nothing – the packed inner-loop path).