Styxis
Company
Knowledge

Large offsets in NumPy cov: separate positive covariance from an approved error budget

Even positive covariance can lose required accuracy at a large offset.

Accuracy beyond the sign of a value

Even positive covariance can lose required accuracy at a large offset. Check translation invariance and an independent error budget. Do not widen the Truthound budget after seeing the result. Numerical error and full-copy memory cost require separate observations; a performance proposal is not accuracy evidence. [1, 2, 3]

Different evidence for the report and a proposed patch

NumPy #33022 reports full-input float64 copying in cov and centering precision loss at large offsets. A maintainer follow-up questions the scaling of a proposed Python block loop. That proposal is not an adopted repair or a performance guarantee, and this article does not newly measure memory or covariance. [1]

Use the same statistical definition

Preserve raw values, offset, ddof, memory measurements and a covariance reference. Hold estimates exceeding the error budget and compare safe translation and memory alternatives. Use the same ddof, axes and weights, checking lossless preservation of differences. A reference of 0 needs an absolute-error policy instead of division by zero. [1, 3]

An error cap fixed in advance

The illustrative analysis sets relative-error budget 0.00001 in advance. Independently derived error 0.000001 is at most that budget and passes; 0.00031 exceeds it and fails. A zero-reference term uses a separate absolute-error policy. This is an upper-bound comparison rather than equality. [1, 3]

Check the at-most relation

Truthound Core Python SDK 3.3.2 can compare prepared covariance_relative_error and approved_relative_error_budget using ColumnPairValidator with relationship="<=". The operator calculates the error and budget. The SDK does not recompute cov or measure peak memory, and this comparison does not guarantee the proposed patch’s performance or accuracy. [1, 2, 3]

Separate accuracy and memory approvals

Pair verified translation or stable accumulation with memory measurements at the actual data scale. Translation cannot recover information already rounded in the source. Reuse an existing error reconciliation for the same conditions, while approving resource costs separately. [1, 3]

Application conditions

Check lossless differences under translation and use the same ddof, axes, weights and advance error policy.

Alternatives

Compare verified translation or stable accumulation together with actual-scale memory measurements.

Limitations

  • Core compares externally calculated errors and budgets; it does not compute covariance, measure copies or guarantee a proposed patch.

Evidence

Event checked
Subject checked
Modified