@@ -2,7 +2,7 @@ using InfiniteLinearAlgebra, BlockBandedMatrices, BlockArrays, BandedMatrices, I
2
2
MatrixFactorizations, ArrayLayouts, LinearAlgebra, Random, LazyBandedMatrices, StaticArrays
3
3
import InfiniteLinearAlgebra: qltail, toeptail, tailiterate , tailiterate!, tail_de, ql_X!,
4
4
InfToeplitz, PertToeplitz, TriToeplitz, InfBandedMatrix, InfBandCartesianIndices,
5
- rightasymptotics, QLHessenberg, ConstRows, PertConstRows,
5
+ rightasymptotics, QLHessenberg, ConstRows, PertConstRows, chop, chop!,
6
6
BandedToeplitzLayout, PertToeplitzLayout, TridiagonalToeplitzLayout, BidiagonalToeplitzLayout
7
7
import Base: BroadcastStyle
8
8
import BlockArrays: _BlockArray
@@ -16,11 +16,17 @@ import LazyBandedMatrices: BroadcastBandedBlockBandedLayout, BroadcastBandedLayo
16
16
@testset " chop" begin
17
17
a = randn (5 )
18
18
b = [a; zeros (5 )]
19
- InfiniteLinearAlgebra . chop! (b, eps ())
19
+ chop! (b, eps ())
20
20
@test b == a
21
21
22
+ @test isempty (chop! ([0 ]))
23
+
22
24
A = randn (5 ,5 )
23
- @test InfiniteLinearAlgebra. chop ([A zeros (5 ,2 ); zeros (2 ,5 ) zeros (2 ,2 )],eps ()) == A
25
+ @test chop ([A zeros (5 ,2 ); zeros (2 ,5 ) zeros (2 ,2 )],eps ()) == A
26
+
27
+ c = PseudoBlockArray ([randn (5 ); zeros (10 )], (blockedrange (1 : 5 ),))
28
+ d = chop! (c, 0 );
29
+ @test length (d) == 6
24
30
end
25
31
26
32
include (" test_infconv.jl" )
0 commit comments