Skip to content

Commit 0aa5444

Browse files
Merge #1253
1253: Fix _array_type for FieldVectors r=charleskawczynski a=charleskawczynski This PR fixes `_array_type` for FieldVectors. Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
2 parents 6c5f62d + 35d8ddc commit 0aa5444

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Fields/fieldvector.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,5 @@ ClimaComms.array_type(x::FieldVector) = _array_type(x)
282282

283283
@inline _array_type(x::FieldVector, pns::Tuple) = promote_type(
284284
_array_type(getproperty(x, first(pns))),
285-
_array_type(x, Base.tail(pns))...,
285+
_array_type(x, Base.tail(pns)),
286286
)

test/Fields/field.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ end
164164
xcenters = Fields.coordinate_field(space).x
165165
y = Fields.FieldVector(x = xcenters)
166166
@test ClimaComms.array_type(y) == Array
167+
y = Fields.FieldVector(x = xcenters, y = xcenters)
168+
@test ClimaComms.array_type(y) == Array
167169
end
168170

169171
@testset "FieldVector basetype replacement and deepcopy" begin

0 commit comments

Comments
 (0)