Skip to content

Commit fd61439

Browse files
committed
test that broadcast retains parent axes for multidim VoA
1 parent af17d47 commit fd61439

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/basic_indexing.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ foo!(u_vector)
252252
@test all(vec(u_matrix) .≈ vec(u_vector))
253253

254254
# test that, for VectorOfArray with multi-dimensional parent arrays,
255-
# `similar` preserves the structure of the parent array
255+
# broadcast and `similar` preserve the structure of the parent array
256256
@test typeof(parent(similar(u_matrix))) == typeof(parent(u_matrix))
257+
@test typeof(parent((x->x).(u_matrix))) == typeof(parent(u_matrix))
257258

258259
# test efficiency
259260
num_allocs = @allocations foo!(u_matrix)

0 commit comments

Comments
 (0)