Skip to content

Commit c80b0cc

Browse files
committed
Fix more tests
1 parent 07d6155 commit c80b0cc

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

src/abstractblocksparsearray/arraylayouts.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ function ArrayLayouts.sub_materialize(layout::BlockLayout{<:SparseLayout}, a, ax
6464
a_dest = BlockSparseArray{eltype(a), length(axes), blocktype_a}(undef, axes)
6565
for I in CartesianIndices(blocks(a_dest))
6666
b = Block(Tuple(I))
67-
block_a = @view a[b]
68-
if !iszero(block_a)
67+
if isstored(a, b)
68+
block_a = @view a[b]
6969
block_dest = similar(a_dest[b])
7070
copyto!(block_dest, block_a)
7171
a_dest[b] = block_dest

test/test_abstract_blocktype.jl

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,12 @@ arrayts = (Array, JLArray)
8888
for f in (left_orth, left_polar, qr_compact, qr_full)
8989
u, c = f(a)
9090
@test u * c a
91-
if arrayt Array
92-
@test isisometric(u; side = :left)
93-
else
94-
# TODO: Fix comparison with UniformScaling on GPU.
95-
@test isisometric(u; side = :left)
96-
end
91+
@test isisometric(u; side = :left)
9792
end
9893
for f in (right_orth, right_polar, lq_compact, lq_full)
9994
c, u = f(a)
10095
@test c * u a
101-
if arrayt Array
102-
@test isisometric(u; side = :right)
103-
else
104-
# TODO: Fix comparison with UniformScaling on GPU.
105-
@test isisometric(u; side = :right)
106-
end
96+
@test isisometric(u; side = :right)
10797
end
10898
for f in (svd_compact, svd_full, svd_trunc)
10999
u, s, v = f(a)

0 commit comments

Comments
 (0)