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
Commit ddcea3d
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Adds indexing atom implementation and other bindings (#20)
* Add index atom for array indexing and slicing
Implements efficient indexing operator that handles both CVXPY's
`index` (slice-based) and `special_index` (array/boolean) atoms.
- Forward: O(n_selected) gather operation
- Jacobian: Pre-computed row mapping for fast memcpy per row
- Hessian: Pre-allocated scatter buffer with accumulation for
repeated indices (equivalent to np.add.at)
Enables NLP tests like test_hs071 and test_rosenbrock that use
x[0], x[1] style indexing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add reshape converter (Fortran order only)
Reshape with order='F' is a pass-through since the underlying data
layout is unchanged - only shape interpretation differs.
Note: Only Fortran order is supported. C order would require data
permutation which is not yet implemented.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add quad_over_lin binding and converter
Enables test_socp and test_portfolio_socp to pass.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add rel_entr binding and converter
Exposes the existing rel_entr C implementation (for equal-sized args)
through Python bindings. The scalar argument variants declared in the
header are not yet implemented in C.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Optimize index atom: add duplicate detection, simplify Jacobian
- Add has_duplicates flag to detect repeated indices at construction
- Hessian eval: fast path (direct write) when no duplicates, avoiding
O(child_size) memset; slow path (zero + accumulate) for duplicates
- Remove jac_row_starts and jac_row_lengths arrays from index_expr
- Simplify jacobian_init: use CSR p array directly instead of helpers
- Simplify eval_jacobian: compute row lengths on the fly (trivial cost)
- Convert &array[i] to array + i style for consistency with codebase
- Update CLAUDE.md with improved build instructions and atom lists
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* small edits, most substantial thing removed unnecessary loop
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Daniel <danielcederberg1@gmail.com>
0 commit comments