@@ -266,12 +266,12 @@ end
266
266
b = sprandn (5 , 5 , 0.2 )
267
267
@test (maximum (abs .(a\ b - Array (a)\ Array (b))) < 1000 * eps ())
268
268
# test error throwing for bwdTrisolve
269
- @test_throws DimensionMismatch a\ Matrix {Float64} (6 , 6 )
269
+ @test_throws DimensionMismatch a\ Matrix {Float64} (I, 6 , 6 )
270
270
a = LowerTriangular (I + tril (0.1 * sprandn (5 , 5 , 0.2 )))
271
271
b = sprandn (5 , 5 , 0.2 )
272
272
@test (maximum (abs .(a\ b - Array (a)\ Array (b))) < 1000 * eps ())
273
273
# test error throwing for fwdTrisolve
274
- @test_throws DimensionMismatch a\ Matrix {Float64} (6 , 6 )
274
+ @test_throws DimensionMismatch a\ Matrix {Float64} (I, 6 , 6 )
275
275
276
276
277
277
426
426
@test_throws ArgumentError permute! (X, A, p, q, (D = copy (C); resize! (D. nzval, nnz (A) - 1 ); D))
427
427
end
428
428
@testset " common error checking of permute[!] methods / source-workcolptr compat" begin
429
- @test_throws DimensionMismatch permute! (A, p, q, C, Vector {eltype(A.rowval)} (length (A. colptr) - 1 ))
429
+ @test_throws DimensionMismatch permute! (A, p, q, C, Vector {eltype(A.rowval)} (uninitialized, length (A. colptr) - 1 ))
430
430
end
431
431
@testset " common error checking of permute[!] methods / permutation validity" begin
432
432
@test_throws ArgumentError permute! (A, (r = copy (p); r[2 ] = r[1 ]; r), q)
@@ -508,16 +508,16 @@ end
508
508
@test var (sparse (Int[])) === NaN
509
509
510
510
for f in (sum, prod, var)
511
- @test isequal (f (spzeros (0 , 1 ), 1 ), f (Array {Int} (0 , 1 ), 1 ))
512
- @test isequal (f (spzeros (0 , 1 ), 2 ), f (Array {Int} (0 , 1 ), 2 ))
513
- @test isequal (f (spzeros (0 , 1 ), (1 , 2 )), f (Array {Int} (0 , 1 ), (1 , 2 )))
514
- @test isequal (f (spzeros (0 , 1 ), 3 ), f (Array {Int} (0 , 1 ), 3 ))
511
+ @test isequal (f (spzeros (0 , 1 ), 1 ), f (Matrix {Int} (I, 0 , 1 ), 1 ))
512
+ @test isequal (f (spzeros (0 , 1 ), 2 ), f (Matrix {Int} (I, 0 , 1 ), 2 ))
513
+ @test isequal (f (spzeros (0 , 1 ), (1 , 2 )), f (Matrix {Int} (I, 0 , 1 ), (1 , 2 )))
514
+ @test isequal (f (spzeros (0 , 1 ), 3 ), f (Matrix {Int} (I, 0 , 1 ), 3 ))
515
515
end
516
516
for f in (minimum, maximum, findmin, findmax)
517
517
@test_throws ArgumentError f (spzeros (0 , 1 ), 1 )
518
- @test isequal (f (spzeros (0 , 1 ), 2 ), f (Array {Int} (0 , 1 ), 2 ))
518
+ @test isequal (f (spzeros (0 , 1 ), 2 ), f (Matrix {Int} (I, 0 , 1 ), 2 ))
519
519
@test_throws ArgumentError f (spzeros (0 , 1 ), (1 , 2 ))
520
- @test isequal (f (spzeros (0 , 1 ), 3 ), f (Array {Int} (0 , 1 ), 3 ))
520
+ @test isequal (f (spzeros (0 , 1 ), 3 ), f (Matrix {Int} (I, 0 , 1 ), 3 ))
521
521
end
522
522
end
523
523
end
@@ -1035,7 +1035,7 @@ end
1035
1035
@test indmax (S) == indmax (A) == CartesianIndex (1 ,1 )
1036
1036
@test indmin (S) == indmin (A) == CartesianIndex (1 ,1 )
1037
1037
1038
- A = Array {Int} (0 , 0 )
1038
+ A = Matrix {Int} (I, 0 , 0 )
1039
1039
S = sparse (A)
1040
1040
iA = try indmax (A) end
1041
1041
iS = try indmax (S) end
0 commit comments