Skip to content

Commit

Permalink
Merge #705
Browse files Browse the repository at this point in the history
705: fix JET tests on nightly r=simonbyrne a=simonbyrne

Fixes #704

- [x] Code follows the [style guidelines](https://clima.github.io/ClimateMachine.jl/latest/DevDocs/CodeStyle/) OR N/A.
- [x] Unit tests are included OR N/A.
- [x] Code is exercised in an integration test OR N/A.
- [x] Documentation has been added/updated OR N/A.


Co-authored-by: Simon Byrne <[email protected]>
  • Loading branch information
bors[bot] and simonbyrne authored May 6, 2022
2 parents db8dd06 + dd13025 commit e4c5262
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Geometry/coordinates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ Base.:(*)(x::Number, p::AbstractPoint) = p * x
Base.:(/)(p::T, x::Number) where {T <: AbstractPoint} =
unionalltype(T)((components(p) / x)...)

Base.LinRange(start::T, stop::T, length::Integer) where {T <: Abstract1DPoint} =
Base.LinRange{T}(start, stop, length)

# we add our own method to this so that `BigFloat` coordinate ranges are computed accurately.
function Base.lerpi(
j::Integer,
Expand Down
3 changes: 1 addition & 2 deletions test/DataLayouts/data1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ end
# property access
@test_opt getproperty(data1, :a)
# test map as proxy for broadcast
@test_opt map(f, data1, data2)
@test_opt mapreduce(f, +, data1, data2)
@test_opt broadcast(f, dl1, dl2)
end
end
end

0 comments on commit e4c5262

Please sign in to comment.