Closed devmotion closed 10 months ago
The performance improvement in https://github.com/JuliaStats/PDMats.jl/commit/a97533d1b2c162d6354834be774beff769f7e8eb had an unforeseen side effect: It increases the probability that the output of the tri products (for PDiagMat matrices) is numerically not exactly symmetric. This causes downstream issues (e.g., in Distributions: https://github.com/JuliaStats/Distributions.jl/issues/1789#issuecomment-1765302266) in further computations (such as cholesky) that fail/error (more often) if the output is not symmetric.
PDiagMat
cholesky
This PR wraps the output of X_A_Xt etc. in a Symmetric to fix these issues. I also added tests.
X_A_Xt
Symmetric
The performance improvement in https://github.com/JuliaStats/PDMats.jl/commit/a97533d1b2c162d6354834be774beff769f7e8eb had an unforeseen side effect: It increases the probability that the output of the tri products (for
PDiagMat
matrices) is numerically not exactly symmetric. This causes downstream issues (e.g., in Distributions: https://github.com/JuliaStats/Distributions.jl/issues/1789#issuecomment-1765302266) in further computations (such ascholesky
) that fail/error (more often) if the output is not symmetric.This PR wraps the output of
X_A_Xt
etc. in aSymmetric
to fix these issues. I also added tests.