File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 623623    copytrito! (dest, U, U isa  UpperOrUnitUpperTriangular ?  ' L' :  ' U' 
624624    return  dest
625625end 
626- @propagate_inbounds  function  _copy! (dest:: StridedMatrix , U:: UpperOrLowerTriangular{<:Any, <:StridedMatrix} )
626+ @propagate_inbounds  function  _copy! (dest:: StridedMatrix ,
627+         U:: Union{UnitUpperOrUnitLowerTriangular, UpperOrLowerTriangularStrided} )
627628    U2 =  Base. unalias (dest, U)
628629    copy_unaliased! (dest, U2)
629630    return  dest
656657    end 
657658    dest
658659end 
659- @inline  function  copy_unaliased! (dest:: StridedMatrix , U:: UpperOrUnitUpperTriangular{<:Any, <:StridedMatrix}  )
660+ @inline  function  copy_unaliased! (dest:: StridedMatrix , U:: UpperOrUnitUpperTriangular )
660661    @boundscheck  checkbounds (dest, axes (U)... )
661662    for  col in  axes (dest,2 )
662663        @inbounds  copy_unaliased_stored! (dest, U, col)
666667    end 
667668    return  dest
668669end 
669- @inline  function  copy_unaliased! (dest:: StridedMatrix , L:: LowerOrUnitLowerTriangular{<:Any, <:StridedMatrix}  )
670+ @inline  function  copy_unaliased! (dest:: StridedMatrix , L:: LowerOrUnitLowerTriangular )
670671    @boundscheck  checkbounds (dest, axes (L)... )
671672    for  col in  axes (dest,2 )
672673        for  row in  firstindex (dest,1 ): col- 1 
Original file line number Diff line number Diff line change 650650            @test_throws  " cannot set index in the upper triangular part" copyto! (A, B)
651651        end 
652652    end 
653+ 
654+     @testset  " partly initialized unit triangular" begin 
655+         for  T in  (UnitUpperTriangular, UnitLowerTriangular)
656+             isupper =  T ==  UnitUpperTriangular
657+             M =  Matrix {BigFloat} (undef, 2 , 2 )
658+             M[1 + isupper,1 + ! isupper] =  3 
659+             U =  T (M' )
660+             @test  copyto! (similar (M), U) ==  U
661+         end 
662+     end 
653663end 
654664
655665@testset  " getindex with Integers" begin 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments