Closed devmotion closed 10 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
e0cad7c
) 91.45% compared to head (0d7f2bd
) 91.48%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Implements
Base.broadcastable
forPDMat
andPDiagMat
by falling back to the wrapped matrix and aDiagonal
object, respectively. Many generic fallbacks use broadcasting, and by falling back on the underlying better supportedAbstractMatrix
objects we reduce the number of surprising and undesired results in broadcasting operations but also e.g. subtraction (see https://github.com/JuliaStats/PDMats.jl/issues/195#issuecomment-1809816905).One could similarly define
Base.broadcastable(a::ScalMat) = Base.broadcastable(Diagonal(fill(a.value, a.dim)))
but this leads to undesired results when working with e.g. static arrays (and causes undesired allocations which could maybe be fixed by working with FillArrays.Fill - but only recently we noticed that a dependency on FillArrays would increase loading time significantly: #192).