Skip to content
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

[a,b] concatenation is deprecated #12

Closed
cormullion opened this issue Sep 1, 2015 · 2 comments
Closed

[a,b] concatenation is deprecated #12

cormullion opened this issue Sep 1, 2015 · 2 comments

Comments

@cormullion
Copy link
Member

I'm seeing loads of these (my terminal's overflowing with warnings...:)):

WARNING: [a,b] concatenation is deprecated; use [a;b] instead
 in depwarn at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in oldstyle_vcat_warning at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in diverging_palette at /Users/cormullion/.julia/v0.4/Colors/src/colormaps.jl:234
 in include at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib

I think it's here:

if isodd(N)
    midcol = weighted_color_mean(0.5, pal1[end], pal2[1])
    return [pal1[1:end-1]; midcol; pal2[2:end]]
else
    return [pal1[1:end-1]; pal2[2:end]]
end

What's the fix - return collect(pal1[1:end-1]; midcol; pal2[2:end])?

@SimonDanisch
Copy link
Member

Wasn't this fixed on master by #9 !?
I can't reproduce it anymore with diverging_palette(0, 360)
Maybe time to tag?!

@cormullion
Copy link
Member Author

Yes, I appear to have an older version, despite running Pkg.update():

- Colors 0.5.2

In my directory I've got:

.julia/v0.4/Colors/src/colormaps.jl

where it says:

if isodd(N)
    midcol = weighted_color_mean(0.5, pal1[end], pal2[1])
    return [pal1[1:end-1], midcol, pal2[2:end]]
else
    return [pal1[1:end-1], pal2[2:end]]
end

which doesn't match the current version.

Sorry for the noise. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants