Skip to content

Commit bc04c80

Browse files
committed
Merge remote-tracking branch 'torfjelde/torfjelde/cholesky' into torfjelde/cholesky
2 parents 2b2e395 + 0a27f7a commit bc04c80

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/nonstandard.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ constructorof(::Type{<:Expr}) = (head, args) -> Expr(head, args...)::Expr
5959

6060
### Cholesky
6161
setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{()}) = C
62-
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{(:L,),Tuple{L}}) where {L<:LinearAlgebra.LowerTriangular}
63-
return LinearAlgebra.Cholesky(C.uplo === 'U' ? copy(transpose(patch.L.data)) : patch.L.data, C.uplo, C.info)
62+
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{(:L,),Tuple{<:LinearAlgebra.LowerTriangular}})
63+
return LinearAlgebra.Cholesky(C.uplo === 'U' ? copy(patch.L.data') : patch.L.data, C.uplo, C.info)
6464
end
65-
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{(:U,),Tuple{U}}) where {U<:LinearAlgebra.UpperTriangular}
66-
return LinearAlgebra.Cholesky(C.uplo === 'L' ? copy(transpose(patch.U.data)) : patch.U.data, C.uplo, C.info)
65+
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{(:U,),Tuple{<:LinearAlgebra.UpperTriangular}})
66+
return LinearAlgebra.Cholesky(C.uplo === 'L' ? copy(patch.U.data') : patch.U.data, C.uplo, C.info)
6767
end
6868
function setproperties(
6969
C::LinearAlgebra.Cholesky,
70-
patch::NamedTuple{(:UL,),Tuple{UL}}
71-
) where {UL<:Union{LinearAlgebra.LowerTriangular,LinearAlgebra.UpperTriangular}}
70+
patch::NamedTuple{(:UL,),Tuple{<:Union{LinearAlgebra.LowerTriangular,LinearAlgebra.UpperTriangular}}}
71+
)
7272
return LinearAlgebra.Cholesky(patch.UL.data, C.uplo, C.info)
7373
end
7474
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple)

0 commit comments

Comments
 (0)