FAILURE MAP
← Case archive

FA-6026 / Linear algebra / Open access

Matrix transpose rectangular · case 01

Copying rows leaves row and column axes unchanged.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Copying rows leaves row and column axes unchanged.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return [list(row) for row in zip(*m)]

Unsuccessful approach: Reversing the transposed rows adds an unwanted reflection.

Case contract

Integer matrix/vector entries, rectangular rows, compatible multiplication dimensions, and square matrices for determinant, trace, inverse, symmetry and characteristic-polynomial operations. Rational matrix outputs are reduced Fraction strings. Matrix transpose rectangular. Exact operational definition: [list(row) for row in zip(*m)]

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Linear algebra results depend on the stated convention.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return [row[:] for row in m]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 2, 3], [4, 5, 6]],)', solve(*([[1, 2, 3], [4, 5, 6]],)), [[1, 4], [2, 5], [3, 6]])
check('fixture 2: ([[1], [2]],)', solve(*([[1], [2]],)), [[1, 2]])
check('fixture 3: ([[7]],)', solve(*([[7]],)), [[7]])
check('fixture 4: ([],)', solve(*([],)), [])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 2, 3], [4, 5, 6]],)[[1, 2, 3], [4, 5, 6]][[1, 4], [2, 5], [3, 6]]Failed
fixture 2: ([[1], [2]],)[[1], [2]][[1, 2]]Failed
fixture 3: ([[7]],)[[7]][[7]]Passed
fixture 4: ([],)[][]Passed

SHA-256 / a9323c241760e5feaf19015d3a4ca9b278b267acad6715426d6eaf80f28f7297

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return [list(row) for row in zip(*m)][::-1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 2, 3], [4, 5, 6]],)', solve(*([[1, 2, 3], [4, 5, 6]],)), [[1, 4], [2, 5], [3, 6]])
check('fixture 2: ([[1], [2]],)', solve(*([[1], [2]],)), [[1, 2]])
check('fixture 3: ([[7]],)', solve(*([[7]],)), [[7]])
check('fixture 4: ([],)', solve(*([],)), [])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 2, 3], [4, 5, 6]],)[[3, 6], [2, 5], [1, 4]][[1, 4], [2, 5], [3, 6]]Failed
fixture 2: ([[1], [2]],)[[1, 2]][[1, 2]]Passed
fixture 3: ([[7]],)[[7]][[7]]Passed
fixture 4: ([],)[][]Passed

SHA-256 / 541d47d7cf45161fd0a2bd65a8e8c9e1bbc4572418d47c09b774e0a3e7a67a3a

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return [list(row) for row in zip(*m)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 2, 3], [4, 5, 6]],)', solve(*([[1, 2, 3], [4, 5, 6]],)), [[1, 4], [2, 5], [3, 6]])
check('fixture 2: ([[1], [2]],)', solve(*([[1], [2]],)), [[1, 2]])
check('fixture 3: ([[7]],)', solve(*([[7]],)), [[7]])
check('fixture 4: ([],)', solve(*([],)), [])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 2, 3], [4, 5, 6]],)[[1, 4], [2, 5], [3, 6]][[1, 4], [2, 5], [3, 6]]Passed
fixture 2: ([[1], [2]],)[[1, 2]][[1, 2]]Passed
fixture 3: ([[7]],)[[7]][[7]]Passed
fixture 4: ([],)[][]Passed

SHA-256 / fe418fcc58787fe601b1ec949cb158e922e5b433bbe36a6bf574cde9dc38e264

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:37:56.540641+00:00.

Case digest / c576c857f479a4d72ae70a1ccc07315ba86a159875e4daa4e3a7e6fcb2167579