I have the following code, where given i I want to find the ith row of a matrix. My code is the following:
function f(mat,i)
println(mat[:i,:])
end
However, I get the following error:
ArgumentError: invalid index: :i of type Symbol
I have tried printing the type of i using typeof and it says it is Int64. Further, if I attempt to just find the first row then mat[:1,:] does the job so I don't think the problem is with the slicing syntax.