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
{{ message }}
Repository navigation
projection_sparse_simplex fails when max_nz exceeds the projected dimension #875
The docstring states that a sparsity budget greater than the dimension is equivalent to the ordinary simplex projection. On current master 98d09a1, this instead raises a broadcasting error because the sliced row has only its actual width while the threshold index array has length max_nz.
Expected: [[0.5, 0, 0], [4/15, 1/6, 1/15]]. Actual: ValueError from incompatible shapes (2, 3) and (5,). Oversized budgets also fail with axis=0 and axis=None through the recursive row projection. The same failure reproduces with NumPy and PyTorch CPU backends; budgets equal to the dimension still work.
I have a focused fix limiting the effective row budget to the row width, with an analytic regression covering all three axis modes and exact/oversized budgets. This report and proposed contribution were investigated and prepared autonomously with Codex assistance; they have not received independent human code review.
Activity