You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>using Dates
julia> x =DateTime(2017, 11, 3):Day(1):DateTime(2018, 11, 3)
2017-11-03T00:00:00:1 day:2018-11-03T00:00:00
julia>sin.(1:length(x)) .*rand(length(x))
ERROR: MethodError: no method matching similar(::Type{Array{Float64,N} where N}, ::Tuple{UnitRange{Int32}})
Closest candidates are:similar(::AbstractArray{T,N}where N, ::Tuple) where T at abstractarray.jl:627similar(::Type{T}, ::Union{Integer, AbstractUnitRange}...) where T<:AbstractArray at abstractarray.jl:670similar(::Type{T}, ::Tuple{Vararg{Int32,N}}where N) where T<:AbstractArray at abstractarray.jl:672...
Stacktrace:
[1] similar(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{UnitRange{Int32}},typeof(*),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(sin),Tuple{UnitRange{Int64}}},Array{Float64,1}}}, ::Type{Float64}) at ./broadcast.jl:196
[2] copy at ./broadcast.jl:839 [inlined]
[3] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(*),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(sin),Tuple{UnitRange{Int64}}},Array{Float64,1}}}) at ./broadcast.jl:819
[4] top-level scope at REPL[34]:1
There may be two bugs here. One is that ranges containing TimeTypes always return a length which is an Int64 and something inside the broadcasting code.
The text was updated successfully, but these errors were encountered:
Julia 1.3.1 official binary for Linux x86:
There may be two bugs here. One is that ranges containing
TimeType
s always return alength
which is anInt64
and something inside the broadcasting code.The text was updated successfully, but these errors were encountered: