Before admitting a finite scalar sqrtm result as a square root
Separate the scalar-input policy from an explicit 1×1 matrix. Verify the returned value against the original equation.
Decide the supported shape first
Establish the supported input shape and an explicit scalar-square-root policy before admitting a returned finite value. Absence of an exception does not promise support for an undocumented input. Record the mathematical meaning of the result separately from the accepted shape. A prepared table of actual candidate squares and original inputs gives Truthound a bounded mathematical comparison. [1, 2, 3]
The reported exponential-looking result
SciPy #25610 reports sqrtm(1) returning [[2.71828183]] instead of a square root or explicit rejection. A maintainer follow-up points to an exp call in the scalar branch and proposes replacing it with sqrt and adding tests. That proposal is distinct from verification of an installed release. [1]
An explicit input boundary
Decide whether scalars are supported at the API boundary. If supported, construct an explicit 1×1 matrix and check its squared residual; otherwise reject scalars without silent repair. Operators prepare actual squared candidates and the independent input under the same call ID. [1, 3]
Squaring should recover 1
The illustrative input is an explicit 1×1 matrix [1]. Candidate 1 squares to the required original value 1 and passes. Candidate exp(1) squares to 7.38905609893065 and fails. Matching a square still leaves the required principal-root branch to be checked separately. [1, 3]
Reconcile the squared-result table
ColumnPairValidator in Truthound Python SDK 3.3.2 compares squared_candidate and original_scalar values calculated by the operator. Squaring and shape-policy selection are external procedures. Core does not replace sqrtm support decisions or matrix calculations, and square agreement does not establish the desired root branch. [1, 2, 3]
Separate scalar and matrix functions
Distinguish scalar square-root functions from matrix square-root APIs, using explicitly documented shapes. A separate regression for the same input policy can make another audit redundant. Do not infer a universal scalar-support promise from one accidental return value. [1, 3]
Application conditions
Define the scalar-support policy and explicit 1×1 input, calculating candidate squares externally.
Alternatives
Distinguish scalar square-root functions from documented matrix input shapes.
Limitations
Square agreement does not establish the desired branch or correctness of the entire matrix.
Evidence
- Event checked
- Subject checked
- Modified
