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
A number of PRs have gone in recently to handle corner cases concerning size 0 inputs that were discovered through the new autodiff test framework, authored in the most part by me.
A couple of comment #1452 ( #1452 (comment) and #1452 (comment)) made me look again at these corner cases, and I realised that things could be handled a bit better.
In particular:
the current checks mishandle matrices of size 0 x N (or N x 0), as we may return an empty square matrix instead of a rectangular one: affects mdivide_left_ldlt, mdivide_right_ldlt and matrix_exp_multiply
we should check for the input matrix being square before returning anything: affects matrix_exp_pade and scale_matrix_exp_multiply, for which we currently we return an empty matrix when we should instead throw
for trace_inv_quad_form_ldlt if the input matrix is 0xN we should return 0, but we currently throw
The text was updated successfully, but these errors were encountered:
These changes all sound good. It's really great that you're sanding off all these rough edges---it makes a big difference in the overall feel of a library when boundary conditions behave correctly.
Description
A number of PRs have gone in recently to handle corner cases concerning size 0 inputs that were discovered through the new autodiff test framework, authored in the most part by me.
A couple of comment #1452 ( #1452 (comment) and #1452 (comment)) made me look again at these corner cases, and I realised that things could be handled a bit better.
In particular:
mdivide_left_ldlt
,mdivide_right_ldlt
andmatrix_exp_multiply
matrix_exp_pade
andscale_matrix_exp_multiply
, for which we currently we return an empty matrix when we should instead throwtrace_inv_quad_form_ldlt
if the input matrix is 0xN we should return 0, but we currently throwThe text was updated successfully, but these errors were encountered: