I'm trying to use mean(A,1)
to get the mean row of a matrix A
, but am getting an error.
For example, try running the command mean(eye(3), 1)
.
This gives the error no method mean(Array{Float64,2},Int32)
.
The only documentation I can find for the mean
function is here:
http://docs.julialang.org/en/release-0.1/stdlib/base/#statistics
mean(v[, region])
Compute the mean of whole array
v
, or optionally along the dimensions inregion
.
What is the region
parameter?
EDIT: for Julia 0.7 and higher, write this as mean(v, dims=1)
.
It must be something with your installation,
mean(eye(3),1)
works just fine here.