Am Montag, 16. Mai 2016 16:11:39 UTC+2 schrieb Chris Rackauckas:
>
> I make this function to solve this problem in one of m codes:
>
> function shapeResult(res)
> #Input is a vector of tuples
> #Output the "columns" as vectors
> out = cell(length(res[1]))
> for i = 1:length(res[1])
>
Am Montag, 16. Mai 2016 14:08:08 UTC+2 schrieb Christopher Fisher:
>
>
> It appears that a::Float64 is converting your array into separate
> instances of Float64. Either of these should work:
>
> tupleFun(a::Array{Float64,2}) = (a+1, a-1)
> tupleFun(rand(3,3))
>
> tupleFun(a) = (a+1, a-1)
>
I make this function to solve this problem in one of m codes:
function shapeResult(res)
#Input is a vector of tuples
#Output the "columns" as vectors
out = cell(length(res[1]))
for i = 1:length(res[1])
out[i] = Vector{typeof(res[1][i])}(length(res))
end
for i = 1:length(res), j =
It appears that a::Float64 is converting your array into separate instances
of Float64. Either of these should work:
tupleFun(a::Array{Float64,2}) = (a+1, a-1)
tupleFun(rand(3,3))
tupleFun(a) = (a+1, a-1)
tupleFun(rand(3,3))
On Sunday, May 15, 2016 at 11:20:33 AM UTC-4, Hakuna M. wrote:
>