I have a handful of colormaps that I’ve created in Julia through PyPlot. The function that I use to create these colormaps triggers a warning message in v0.6.0 that I’m not sure how to fix.
For example, if I try to create a colormap as follows:
using PyPlot
blue_r_cmap =Pyplot.ColorMap("blue_r",
[(0.0,1.0,1.0),(0.1,1.0,1.0),(1.0,0.0,0.0)],
[(0.0,1.0,1.0),(0.1,1.0,1.0),(1.0,0.0,0.0)],
[(0.0,1.0,1.0),(0.1,1.0,1.0),(1.0,0.7,0.7)],33,1.0)
I get a warning message stating:
WARNING: Array{T}(::Type{T}, m::Int) is deprecated, use Array{T}(m) instead.
Stacktrace:
[1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
[2] Array(::Type{Tuple{Float64,Float64,Float64}}, ::Int64) at ./deprecated.jl:57
[3] PyPlot.ColorMap(::String, ::Array{Tuple{Float64,Float64,Float64},1}, ::Array{Tuple{Float64,Float64,Float64},1}, ::Array{Tuple{Float64,Float64,Float64},1}, ::Int64, ::Float64) at /home/metjon/.julia/v0.6/PyPlot/src/colormaps.jl:61
[4] include_string(::String, ::String) at ./loading.jl:515
[5] include_string(::Module, ::String, ::String) at /home/metjon/.julia/v0.6/Compat/src/Compat.jl:464
[6] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/metjon/.julia/v0.6/IJulia/src/execute_request.jl:154
[7] eventloop(::ZMQ.Socket) at /home/metjon/.julia/v0.6/IJulia/src/eventloop.jl:8
[8] (::IJulia.##14#17)() at ./task.jl:335
while loading In[3], in expression starting on line 1
I tried working around this issue by changing the format of the input arrays as suggested by the warning message but I couldn’t find a way to get it to work. I’m probably overlooking something rather simple, but I’d appreciate any suggestions on how to get rid of this warning message. Since I’m loading in a handful of these colormaps, the warning message gets pretty lengthy.
Thanks!