constraints.NullSpaceMap
constraints.NullSpaceMap(matrix, params)
Null-space projection matrix that operates directly on parameter dicts.
Wraps the null-space matrix N (shape n_params × n_free) together with the parameter structure so that dict ↔︎ vector conversions are automatic.
Supports
N @ reduced_vec → dict[str, Array] (expand reduced → full space) full_dict @ N → Array (project full → reduced space) full_vec @ N → Array (same, from a flat vector)
The raw matrix is accessible via N.matrix if needed.
Methods
| Name | Description |
|---|---|
| pack | Pack a full-space dict into a flat vector (consistent with params ordering). |
| unpack | Unpack a flat vector into a full-space dict (inverse of pack). |
pack
constraints.NullSpaceMap.pack(full_dict)
Pack a full-space dict into a flat vector (consistent with params ordering).
unpack
constraints.NullSpaceMap.unpack(flat)
Unpack a flat vector into a full-space dict (inverse of pack).