-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mid(X) doesn't work for a IntervalBox in 0.7 #175
Comments
Oh :/ |
Possibly due to JuliaLang/julia#26435 |
#176 makes broadcasting work, but it's currently very slow, so is presumably not the correct solution on 0.7: julia> using IntervalArithmetic, BenchmarkTools
julia> X = IntervalBox(1..2, 3..4)
[1, 2] × [3, 4]
julia> @btime mid.($X.v)
5.186 ns (0 allocations: 0 bytes)
2-element StaticArrays.SArray{Tuple{2},Float64,1,2}:
1.5
3.5
julia> @btime mid.($X)
159.861 ns (5 allocations: 208 bytes)
2-element StaticArrays.SArray{Tuple{2},Float64,1,2}:
1.5
3.5
julia> @btime mid($X)
147.446 ns (4 allocations: 160 bytes)
2-element StaticArrays.SArray{Tuple{2},Float64,1,2}:
1.5
3.5 |
This is now fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Both
mid(X)
andmid.(X)
seem to hang on Julia 0.7mid.(X.v)
works absolutely fine though.The text was updated successfully, but these errors were encountered: