block_sumsq_over_probes#
- t3toolbox.backend.fitting.block_sumsq_over_probes(zz, n_w, has_order)#
def block_sumsq_over_probes( zz: typ.Union[typ.Sequence[NDArray], NDArray], # ragged len=d (elm [order]+W+C+(Ni,)) OR packed (d,)+[order]+W+C+(N,) n_w: int, # number of leading W axes (unused; see block_sumsq_over_samples) has_order: bool, ) -> NDArray: # (d, n_order) -- per-(mode, order) sum of squares
Per-
(mode, order)sum-of-squares for the vector-output probe kinds -> a 2-D(d, n_order)matrix (dprobe modes). Keeps the mode axis (and a leading order axis, if any) and sums the rest (W+C+ the free mode); UNWEIGHTED. Mirrorszz’s packedness (likesumsq_over_probes()): a raggedlen=dlist stacks per-mode reductions; a packed uniform(d,)+[order]+W+C+(N,)array keeps the leadingd(and order) axes and sums the rest – the padded free modeNis a zeroed prefix (likesumsq), so it contributes nothing. So the uniform probe kinds inherit this verbatim viadc.replace(no override needed).