mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
Removes out-of-bounds access to first element in optimizeCallback when the provided array/matrix is empty. Also adds numerous unit tests for such edge cases, and fixes a previously unreported internal bug in SparseMatrix, violating its own invariants on empty matrices. Resolves #3564. --------- Co-authored-by: Glen Whitney <glen@studioinfinity.org>