Created
September 29, 2015 17:30
-
-
Save pkofod/3453c0390de3afce3df8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create matrix | |
A = rand(3,9) | |
#Sum over rows -> matrix | |
typeof(sum(A, 1)) == Matrix{Float64} #true | |
#Sum over cols -> matrix | |
typeof(sum(A,2)) == Matrix{Float64} #true | |
#This is expected, but what is the best way to extract the vector? This? | |
typeof(sum(A,1)[:]) == Vector{Float64} #true | |
typeof(sum(A,2)[:]) == Vector{Float64} #true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment