Skip to content

Commit 5383884

Browse files
committed
Use broadcasting in mince
1 parent 65ca77f commit 5383884

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/intervals/arithmetic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,5 +577,5 @@ as a vector.
577577
"""
578578
function mince(x::Interval, n)
579579
nodes = range(x.lo, x.hi, length = n+1)
580-
return [Interval(nodes[i], nodes[i+1]) for i in 1:length(nodes)-1]
580+
return @. Interval(nodes[1:n], nodes[2:n+1])
581581
end

0 commit comments

Comments
 (0)