We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f36036c commit 68c8708Copy full SHA for 68c8708
stdlib/LinearAlgebra/src/triangular.jl
@@ -2586,7 +2586,13 @@ function sqrt(A::UpperTriangular)
2586
end
2587
2588
2589
- sqrt(A,Val(realmatrix))
+ # Writing an explicit if instead of using Val(realmatrix) below
2590
+ # makes the calls to sqrt(::UpperTriangular,::Val) type stable.
2591
+ if realmatrix
2592
+ return sqrt(A,Val(true))
2593
+ else
2594
+ return sqrt(A,Val(false))
2595
+ end
2596
2597
function sqrt(A::UpperTriangular{T},::Val{realmatrix}) where {T,realmatrix}
2598
B = A.data
0 commit comments