Skip to content

Commit

Permalink
Merge pull request #117 from PALEOtoolkit/fieldarray_fix
Browse files Browse the repository at this point in the history
Bugfix for FieldArray with CartesianLinearGrid and no record dimension
  • Loading branch information
sjdaines authored Jan 6, 2025
2 parents f1b1aa6 + 836b403 commit c2c14fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FieldRecord.jl
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ Base.getindex(rv::FieldRecordValues{E, R, Nothing, 1, 1, false, false, N}, i, j)

Base.size(rv::FieldRecordValues{E, R, LI, NumSpatialDims, NumDataDims, false, false, N}) where {
E, R, LI, NumSpatialDims, NumDataDims, N,
} = (size(rv.linear_index)..., size(first(rv.records))[2:end])
} = (size(rv.linear_index)..., size(first(rv.records))[2:end]...)
function Base.getindex(rv::FieldRecordValues{E, R, LI, 2, 0, false, false, N}, i, j) where {E, R, LI, N}
linear_idx = rv.linear_index[i, j]
return ismissing(linear_idx) ? missing : rv.records[1][linear_idx]
Expand Down

0 comments on commit c2c14fa

Please sign in to comment.