symforce-org / symforce

Fast symbolic computation, code generation, and nonlinear optimization for robotics
https://symforce.org
Apache License 2.0
1.44k stars 147 forks source link

Sparse matrices in Python #24

Closed aaron-skydio closed 2 years ago

aaron-skydio commented 2 years ago

Generated python functions should support sparse matrix outputs (with scipy.sparse.csc_matrix). We should be able to generate factors with opt.Factor with sparse hessians, and linearize them into a wrapped linearized_sparse_factor_t