You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug #28: when only one variable resolves (single-name correlation
request, or several names but only one in the .vmrs), the 1xN input
to numpy.corrcoef returned a 0-d scalar instead of a (1,1) matrix.
Downstream _matrix_to_optional_list then died with "iteration over
a 0-d array".
Fix: _corrcoef now promotes a 0-d numpy result to a (1,1) array
before returning. Single-variable correlation correctly serialises
as [[1.0]] in the JSON envelope.
404 tests pass (+2 covering single-row and multi-row cases as
regression sentinels).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,16 @@ All notable changes to ModelRisk MCP. Follows [Keep a Changelog](https://keepach
4
4
5
5
## [Unreleased]
6
6
7
+
## [0.3.0-alpha.26] — 2026-05-22
8
+
9
+
### Fixed
10
+
11
+
-**Bug #28 — `get_correlation_matrix` crashed when only one variable resolved.** For a 1×N input matrix (one variable), `numpy.corrcoef` returns a 0-d scalar of value 1.0 (the variable's self-correlation) instead of a 2-d (1, 1) matrix. The downstream `_matrix_to_optional_list` then died with `TypeError: iteration over a 0-d array`. Surfaces in real use when `get_correlation_matrix` is called with a single name (or where several names are requested but only one resolves — the failure mode in the autonomous test pass). Fix: `_corrcoef` now promotes a 0-d numpy result to a (1, 1) array before returning. The downstream JSON envelope correctly serialises the trivial `[[1.0]]` matrix.
12
+
13
+
### Tests
14
+
15
+
404 unit tests pass (+2 in `test_mrservice.py::TestCorrcoefHelper` covering single-row and multi-row cases — sentinel against the 0-d regression).
16
+
7
17
## [0.3.0-alpha.25] — 2026-05-22
8
18
9
19
Two bugs surfaced by the autonomous end-to-end test pass against a model with extensive text labels.
0 commit comments