-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
added example of array type conversion #17663
Conversation
... because it seems to bite less experienced users like myself. (Stolen from Terry Seaward's email, https://groups.google.com/d/msg/julia-users/wzaJw_FfNlA/qcuZ4FggEL4J)
One could also consider julia> a=[1 2 3; 4 5 6]
2×3 Array{Int64,2}:
1 2 3
4 5 6
julia> convert(Array{Float64}, a)
2×3 Array{Float64,2}:
1.0 2.0 3.0
4.0 5.0 6.0 as it actually converts the elements. Just an idea, not sure this is indeed better. |
I would say showing an actual conversion taking place is useful so +1 to above |
@martinholters your example is better, OK with me to change. |
@mzaffalon is this your first Julia PR? Welcome to Julia, if so! (Or a much-belated hello otherwise.) Thanks for adding docs. Do you need help making the update to the PR? |
@kshyatt something like this? If not, then I would need help with rebasing, but I guess the 8 hour time zone difference won't help... |
You could have squashed the two commits, but we can do so upon merge, too, so no worries. |
I thought I did squash it. |
@martinholters sorry to bother when 0.5 is about to be released: is there something I should do with this PR? Can it be merged? |
* added example of array type conversion ... because it seems to bite less experienced users like myself. (Stolen from Terry Seaward's email, https://groups.google.com/d/msg/julia-users/wzaJw_FfNlA/qcuZ4FggEL4J) * added example of array type conversion (cherry picked from commit 62615c3)
* added example of array type conversion ... because it seems to bite less experienced users like myself. (Stolen from Terry Seaward's email, https://groups.google.com/d/msg/julia-users/wzaJw_FfNlA/qcuZ4FggEL4J) * added example of array type conversion
... because it seems to bite less experienced users like myself.
(Stolen from Terry Seaward's email, https://groups.google.com/d/msg/julia-users/wzaJw_FfNlA/qcuZ4FggEL4J)