TimeSeries findwhen function hangs with v0.7-rc2


#1

Maybe a Julia v0.7 bug…?

julia> dates  = collect(Date(1999,1,1):Date(2000,12,31));

julia> mytime = TimeArray(dates, rand(length(dates),2))
731x2 TimeArray{Float64,2,Date,Array{Float64,2}} 1999-01-01 to 2000-12-31
│            │ _1     │ _2     │
├────────────┼────────┼────────┤
│ 1999-01-01 │ 0.8498 │ 0.5846 │
│ 1999-01-02 │ 0.8398 │ 0.3832 │
│ 1999-01-03 │ 0.2865 │ 0.8192 │
│ 1999-01-04 │ 0.9952 │ 0.8043 │
│ 1999-01-05 │ 0.2941 │ 0.4246 │
│ 1999-01-06 │ 0.2726 │ 0.8125 │
│ 1999-01-07 │ 0.8282 │ 0.0105 │
│ 1999-01-08 │ 0.3519 │ 0.83   │
│ 1999-01-09 │ 0.43   │ 0.1853 │
│ 1999-01-10 │ 0.7529 │ 0.2477 │
│ 1999-01-11 │ 0.3677 │ 0.3418 │
│ 1999-01-12 │ 0.2863 │ 0.2333 │
│ 1999-01-13 │ 0.313  │ 0.9495 │
   ⋮
│ 2000-12-20 │ 0.1417 │ 0.9531 │
│ 2000-12-21 │ 0.4399 │ 0.3942 │
│ 2000-12-22 │ 0.7159 │ 0.6936 │
│ 2000-12-23 │ 0.2967 │ 0.1781 │
│ 2000-12-24 │ 0.9282 │ 0.6196 │
│ 2000-12-25 │ 0.9145 │ 0.5736 │
│ 2000-12-26 │ 0.4338 │ 0.7525 │
│ 2000-12-27 │ 0.5433 │ 0.8767 │
│ 2000-12-28 │ 0.6796 │ 0.7696 │
│ 2000-12-29 │ 0.6146 │ 0.2691 │
│ 2000-12-30 │ 0.7895 │ 0.9263 │
│ 2000-12-31 │ 0.9796 │ 0.5622 │

julia> findwhen(mytime["_1"] .> mytime["_2"])
^CERROR: InterruptException:
Stacktrace:
 ... (the last 6 lines are repeated 237 more times)
 [1438] backtrace() at ./stacktraces.jl:167
 [1438] macro expansion at ./deprecated.jl:72 [inlined]
 [1438] macro expansion at ./logging.jl:311 [inlined]
 [1438] depwarn(::String, ::Symbol) at ./deprecated.jl:68
 [1438] >(::TimeArray{Float64,1,Date,Array{Float64,1}}, ::TimeArray{Float64,1,Date,Array{Float64,1}}) at ./deprecated.jl:54
 [1438] _broadcast_getindex_evalf(::typeof(>), ::TimeArray{Float64,1,Date,Array{Float64,1}}, ::TimeArray{Float64,1,Date,Array{Float64,1}}) at ./broadcast.jl:574
 [1438] _broadcast_getindex(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(>),Tuple{Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}},Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}}}}, ::CartesianIndex{0}) at ./broadcast.jl:547
 [1438] getindex(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(>),Tuple{Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}},Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}}}}, ::CartesianIndex{0}) at ./broadcast.jl:507
 [1438] copy(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(>),Tuple{Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}},Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}}}}) at ./broadcast.jl:734
 [1438] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(>),Tuple{Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}},Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}}}}) at ./broadcast.jl:724
 [1438] >(::TimeArray{Float64,1,Date,Array{Float64,1}}, ::TimeArray{Float64,1,Date,Array{Float64,1}}) at ./deprecated.jl:55
 [1438] _broadcast_getindex_evalf(::typeof(>), ::TimeArray{Float64,1,Date,Array{Float64,1}}, ::TimeArray{Float64,1,Date,Array{Float64,1}}) at ./broadcast.jl:574
 [1438] _broadcast_getindex(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(>),Tuple{Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}},Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}}}}, ::CartesianIndex{0}) at ./broadcast.jl:547
 [1438] getindex(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(>),Tuple{Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}},Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}}}}, ::CartesianIndex{0}) at ./broadcast.jl:507
 [1438] copy(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(>),Tuple{Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}},Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}}}}) at ./broadcast.jl:734
 [1438] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(>),Tuple{Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}},Base.RefValue{TimeArray{Float64,1,Date,Array{Float64,1}}}}}) at ./broadcast.jl:724

version info:

julia> versioninfo()
Julia Version 0.7.0-rc2.0
Commit 78540cba4c (2018-08-02 19:14 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, haswell)
Environment:
  JULIA_NUM_THREADS = 4