A robot signal helper may request a five-sample moving average and use NumPy's convolve with mode set to valid. If the available trace contains only three samples, that call can still return three numbers. The mode name does not establish that the acquired trace contained three complete five-sample windows.

An original NumPy 2.5.2 replay separates the mathematical convolution result from a proposed full-window data requirement. The values are invented and unitless. No sensor stream, robot controller, production filter, or timing benchmark was operated. The question is which observations were actually available for each claimed window.

Declare the application's window requirement

For this example, the proposed helper accepts a moving-average result only when all five contributing sample positions come from the acquired trace. It does not pad missing observations, shorten the window automatically, or substitute a partial-window average. This is an explicit application policy, rather than a claim about every useful filtering design.

The short trace is [2,5,8], with three acquired samples. The coefficient vector has five entries, each equal to 1/5. A complete five-sample window cannot fit anywhere inside a three-sample trace. Under the declared policy, the number of acceptable full windows is zero before a convolution function is called.

Read the library's output-length rule

NumPy's convolve reference defines valid output length as the larger input length minus the smaller input length plus one. It also states that the inputs are swapped before computation if the second is longer. Those rules treat the two finite sequences symmetrically for this operation; they do not assign one permanently to the role of an acquired trace.

With input lengths three and five, the documented length is 5-3+1, or three. The executed call returns [3,3,3]. Reversing the argument order produces the same valid output in the fixture. This is expected mathematical behavior, not evidence of a broken valid-mode implementation.

Inspect the actual overlap

Each retained convolution position contains all three trace values aligned against three of the five equal coefficients. The sum of the trace is 15, and each participating coefficient is 1/5, so each retained result is 15/5=3. Moving the shorter trace across the equal interior coefficients produces the same sum at three positions.

That result is not the arithmetic mean of the three acquired samples, which is 15/3=5. It is also not an observed mean of five acquired samples, because only three observations exist. Changing the denominator would create a different calculation and would require a different application contract.

The phrase complete overlap therefore needs its operands identified. In this replay, the shorter finite sequence can lie completely within the longer coefficient sequence. That is different from placing the complete five-coefficient filter support inside the three-observation trace under the proposed data-coverage rule.

Keep full-output indices visible

The fixture also computes the full linear convolution, which is [0.4,1.4,3,3,3,2.6,1.6]. The valid result is its slice from indices 2 through 4 inclusive, using zero-based indexing with both finite input origins at zero. This shows precisely which mathematical positions were retained.

Neither the three output values nor those full-convolution indices create additional acquired samples. A helper still needs a separate timestamp and filter-alignment convention before displaying any result as a value associated with a robot log time. The short fixture does not invent three eligible five-sample timestamps from its three-element output.

Compare an explicit window extraction

The replay asks sliding_window_view for windows of length five over the same three-sample trace. On the tested runtime, that call raises ValueError because the requested window is larger than the input. The two functions are answering different requests: convolution returns a mathematically defined selection, while this window extraction cannot produce a five-element slice from the short trace.

NumPy's sliding-window reference describes the extracted shape as trimmed source dimensions followed by window dimensions. In the proposed helper, checking acquired length before either implementation provides a direct statement of the required coverage. No memory-write behavior or aliasing experiment is needed to establish that length condition.

Replay a trace that is long enough

The second original trace is [2,5,8,11,14,17], with six acquired samples. A length-five extraction now returns two rows: [2,5,8,11,14] and [5,8,11,14,17]. Their arithmetic means are 8 and 11 respectively.

Convolving this longer trace with the same five equal coefficients in valid mode also returns [8,11] within floating-point tolerance. Here the coefficient sequence is no longer the longer input. The retained convolution positions correspond to complete five-sample windows within the trace under the declared policy.

The contrast is the important test. A successful valid-mode calculation alone does not establish sufficient acquired length, but the result agrees with explicit full-window means when the coverage condition is met in this fixture. Retain both the positive and negative input-length cases when reviewing a helper.

Do not use same as an automatic repair

For the short trace, mode same returns five values on the tested NumPy version: [1.4,3,3,3,2.6]. That output length follows the larger input, rather than necessarily preserving the first argument's three samples. Merely changing the mode would therefore not implement the proposed full-window requirement.

An application can deliberately choose another boundary policy, including padding or partial windows, but it should identify the assumed values and changed normalization. The present example tests none of those alternatives as an approved processing policy. Its short-input outcome remains insufficient acquired length.

Preserve coverage with the numerical result

A proposed receipt records the trace identity, acquired sample count, required window length, coefficient vector, mode, output length, alignment convention, and whether complete input windows exist. The local proof additionally keeps the full convolution, oversized-window exception, longer trace, extracted rows, and their means.

The practical correction is to check the role-specific data requirement before trusting a mode label. For a helper that promises complete five-sample averages, require at least five acquired samples and verify output against that contract. NumPy's valid convolution can be mathematically correct while the short trace still fails that application's coverage requirement.

Sources checked November 18, 2026:

NumPy, numpy.convolve, version 2.5 manual:

https://numpy.org/doc/stable/reference/generated/numpy.convolve.html

NumPy, numpy.lib.stride_tricks.sliding_window_view, version 2.5 manual:

https://numpy.org/doc/stable/reference/generated/numpy.lib.stride_tricks.sliding_window_view.html

Python 3.14.7 and NumPy 2.5.2 produced the isolated calculations. The traces, coverage policy, and receipt design are original T-800 editorial work; no source example or measured robot signal is reproduced.

Illustration: an AI-generated concept contrasts three returned convolution values with zero complete five-sample input windows. It is not a measured filtering result or a real controller interface.