The direct answer

Require the intended input and result shapes together with the exact ordered record identities. For this per-record plan, both inputs must be one-dimensional vectors of the same declared length. A column and a vector can broadcast into an all-pairs table without identifying a data-association error.

Specify which records each difference compares

An AI evaluation report needs one prediction-minus-reference difference for each of two records. Both inputs contain two permitted numbers, but one adapter produces a column while another produces a one-dimensional vector. The operation can be numerically compatible and still describe a different comparison.

This worksheet selects one fixed subtraction over two already admitted, ordinary record vectors. It does not choose a quality metric, aggregate differences or rank models. The comparison guide still owns task design and evidence. Here the new decision is which record pairs the array geometry permits.

Read compatibility as a shape rule, not an identity check

The inspected NumPy v2.5 broadcasting manual compares trailing dimensions: each pair must be equal or include a size-one dimension; missing dimensions count as one. Its outer-operation example expands a column and a vector into a larger table. It also warns that some broadcast computations use excessive memory.

The companion v2.5 subtract reference defines elementwise subtraction; differing input shapes must broadcast to a common shape that becomes the output shape. These bodies describe documented mechanics, not an installed NumPy release or our adapter.

A library-compatible operation therefore need not be the operation the evaluator intended. “Elementwise” describes positions after the applicable shape rules; it does not establish that two positions represent the same case. Record association belongs to trusted application evidence.

Work the two-record counterexample on paper

Invent an ordered manifest [R-A, R-B]. Prediction labels are [3, 8] and reference labels are [1, 7], in the same fictional unit. These are teaching numbers, not observed model outputs or constructed arrays. With both declared shapes (2,), the proposed per-record differences are 2 for R-A and 1 for R-B.

Change only the prediction geometry to (2,1), leaving reference shape (2,). Applying the documented rules on paper gives a (2,2) comparison table. The first row compares prediction 3 with references 1 and 7; the second compares prediction 8 with those same two references.

Original paper pair meanings — PROPOSED_UNRUN
Prediction recordReference R-A: 1Reference R-B: 7
R-A: 32 — intended same-record pair−4 — different-record pair
R-B: 87 — different-record pair1 — intended same-record pair

This is a derivation from the documented shape rules and elementary arithmetic, not a NumPy result captured from execution. Four differences answer an all-pairs question. Averaging that table would not repair the missing per-record contract, and no aggregate score is proposed here.

Admit exact axes and ordered identities together

Our original application policy requires exactly two nonempty one-dimensional inputs, each shape (2,), with a single record axis. Both carry independently established ordered identities [R-A, R-B]. Require the same admitted unit and ordinary signed-integer representation, with every input between −100 and 100. The paper subtraction range is then −200 through 200.

The real numeric adapter must independently establish those bounds and supported exact operations. Object arrays, subclasses, overloads, implicit coercion, floating-point values, special values, custom output destinations and masked operations are outside this profile. We have not inspected an implementation or proved an installed configuration.

Do not flatten, squeeze, reshape, reorder, pad or drop data until a check passes. Each is a changed proposal that needs a supported association rule. Equal total element count is weaker than the selected axis contract; matching shapes are weaker than matching ordered identities. Preserve both checks instead of substituting one for the other.

Keep a small receipt with a conditional positive

Original proposed comparison receipt — PROPOSED_UNRUN
Receipt fieldRequired association
Task and inputsFixed subtraction plan, admitted prediction/reference revisions and owners.
MeaningExact ordered case identities, unit and one record axis on both sides.
GeometryBoth input shapes (2,), expected result shape (2,), two required per-record results.
Numeric contractSupported bounded ordinary integers and complete result capture.
ReleaseResult-to-record association, current permitted audience and independent review.

The useful positive conditionally admits this fixed two-record computation plan when every receipt field is established. A later complete result would still need its own supported capture and release evidence. Shape compatibility is not a model-quality result, a statistical conclusion or authorization to publish an evaluation.

Actual runtime, input extraction, ID ordering, unit policy, numeric representation, complete adapter, resource bounds and current rights are unimplemented or unknown here. Any missing prerequisite blocks a real positive. A plausible-looking difference is not independent evidence for the inputs that produced it.

Walk eight inert shape decisions

Eight original decisions — all PROPOSED_UNRUN
ConditionProposed disposition
1. Both shapes (2,), exact ordered identities, admitted values and all receipt fields holdConditionally admit only the fixed per-record plan.
2. Prediction shape (2,1), reference shape (2,)Reject the unintended all-pairs geometry before computation.
3. Shapes match but reference identities are reversedReject association independently of compatibility.
4. A single value is offered for two required recordsOutside this no-repetition application plan.
5. Shape (1,2) has the expected two valuesReject the wrong axis contract despite equal count.
6. A required record is missing or lengths conflictHold without padding, dropping or silent repair.
7. Values use another unit, unsupported type or coercionReject the independent numeric contract.
8. Geometry is correct but complete output association or current rights is unknownWithhold release; compatible shapes do not settle those fields.

Report only the evidence this worksheet supplies

No NumPy import, array, subtraction, shape transformation, dataset, metric, model or runtime fixture was constructed or executed. Actual allocation and performance were not measured; a changed comparison count is not a universal memory ceiling.

Existing join-key admission, scalar arithmetic and business validation remain separate. Boundary is prelaunch with planned request-path checks, not a shipped numerical evaluator. Its synthetic policy evidence verifies different behavior.

Primary sources

Official references supporting the guidance. Examples in this guide are synthetic and are not reports of a production incident.

  1. NumPy v2.5 Manual — Broadcasting
  2. NumPy v2.5 Manual — numpy.subtract