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

added example of array type conversion #17663

Merged
merged 3 commits into from
Aug 16, 2016
Merged

added example of array type conversion #17663

merged 3 commits into from
Aug 16, 2016

Conversation

mzaffalon
Copy link
Contributor

... 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)

... 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)
@martinholters
Copy link
Member

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.

@KristofferC
Copy link
Sponsor Member

KristofferC commented Jul 28, 2016

I would say showing an actual conversion taking place is useful so +1 to above

@mzaffalon
Copy link
Contributor Author

@martinholters your example is better, OK with me to change.

@kshyatt kshyatt added domain:docs This change adds or pertains to documentation domain:types and dispatch Types, subtyping and method dispatch labels Jul 28, 2016
@kshyatt
Copy link
Contributor

kshyatt commented Jul 28, 2016

@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?

@mzaffalon
Copy link
Contributor Author

@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...

@martinholters
Copy link
Member

You could have squashed the two commits, but we can do so upon merge, too, so no worries.

@mzaffalon
Copy link
Contributor Author

I thought I did squash it.

@mzaffalon
Copy link
Contributor Author

@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?

@tkelman tkelman merged commit 62615c3 into JuliaLang:master Aug 16, 2016
@mzaffalon mzaffalon deleted the patch-1 branch August 16, 2016 06:22
tkelman pushed a commit that referenced this pull request Aug 20, 2016
* 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)
mfasi pushed a commit to mfasi/julia that referenced this pull request Sep 5, 2016
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation domain:types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants