Skip to content

docs: restructure README around the nested subpackage layout#90

Merged
tschm merged 1 commit into
mainfrom
readme-nested-structure
Jul 3, 2026
Merged

docs: restructure README around the nested subpackage layout#90
tschm merged 1 commit into
mainfrom
readme-nested-structure

Conversation

@tschm

@tschm tschm commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Reorganize the README function reference by subpackage (core, covariance, decomposition, kkt, norm, operators, solve), fixing all source links that still pointed at the deleted flat-layout files
  • Add a package-structure table to the Usage section and note that the full public API remains importable from the cvx.linalg top level
  • Document the previously missing public API: norm, cov_to_corr, warn_ill_conditioned, DEFAULT_COND_THRESHOLD, the SymmetricOperator protocol and its backends (DenseOperator, IncrementalDenseOperator, GramOperator, FactorOperator, SumOperator), bordered_solve, and AffineProjection

🤖 Generated with Claude Code

The README still described the pre-0.9 flat module layout: function links
pointed at deleted files (src/cvx/linalg/norm.py etc.) and the operators,
kkt, norm, and covariance additions were missing entirely. Reorganize the
function reference by subpackage (core, covariance, decomposition, kkt,
norm, operators, solve) with working links, and document the newly public
norm, cov_to_corr, warn_ill_conditioned, DEFAULT_COND_THRESHOLD, the
SymmetricOperator protocol with its backends, bordered_solve, and
AffineProjection.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 3, 2026 16:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorganizes the README’s API reference to match the project’s nested subpackage layout (core, covariance, decomposition, kkt, norm, operators, solve), and updates documentation links accordingly so users can navigate the new structure while still using the top-level cvx.linalg re-exports.

Changes:

  • Restructures the README function/type reference by subpackage and updates source links to the new paths.
  • Adds a subpackage structure table and clarifies that the public API is re-exported from cvx.linalg (with ewm_covariance as a documented exception).
  • Documents additional previously-missing public API items (norms, covariance conversion, ill-conditioning helpers/constants, operator backends, and KKT utilities).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines +123 to +127
protocol captures exactly that contract (including `rcond_free` for detecting
rank-deficient free blocks and `restricted(free)` for a pre-sliced free-block
view), and the backends implement it at very different cost:

- **[`SymmetricOperator`](https://github.com/Jebel-Quant/linalg/blob/main/src/cvx/linalg/operators/base.py)** — Protocol exposing a symmetric matrix through `matvec`, `block_matvec`, `solve_free`, `apply_free`, `rcond_free`, `restricted`, and `diag`
Comment thread README.md
Comment on lines +136 to +138
Building blocks for active-set and path-tracing solvers, built on top of the
operator protocol:

Comment thread README.md
- **[`valid(matrix)`](https://github.com/Jebel-Quant/linalg/blob/main/src/cvx/linalg/core/valid.py)** — Return a boolean mask and valid submatrix by removing rows/columns with non-finite diagonal entries
- **[`cond(matrix, p=None)`](https://github.com/Jebel-Quant/linalg/blob/main/src/cvx/linalg/core/exceptions.py)** — Condition number of a matrix (NaN-aware); accepts the same `p` norm values as `numpy.linalg.cond`
- **[`check_and_warn_condition(matrix, threshold)`](https://github.com/Jebel-Quant/linalg/blob/main/src/cvx/linalg/core/exceptions.py)** — Emit `IllConditionedMatrixWarning` when the condition number exceeds the threshold
- **[`warn_ill_conditioned(cond_value, threshold)`](https://github.com/Jebel-Quant/linalg/blob/main/src/cvx/linalg/core/exceptions.py)** — Emit `IllConditionedMatrixWarning` for an already-computed condition number
@tschm tschm merged commit 55f82f2 into main Jul 3, 2026
64 checks passed
@tschm tschm deleted the readme-nested-structure branch July 3, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants