diff --git a/src/Geometry/coordinates.jl b/src/Geometry/coordinates.jl index 768caa96b3..338e71d13b 100644 --- a/src/Geometry/coordinates.jl +++ b/src/Geometry/coordinates.jl @@ -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, diff --git a/test/DataLayouts/data1d.jl b/test/DataLayouts/data1d.jl index 64509b5ebd..ba66c3a5cb 100644 --- a/test/DataLayouts/data1d.jl +++ b/test/DataLayouts/data1d.jl @@ -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