Hi all,

I have a few simple questions to ask.

1) What function is invoked when I type x in the following example? I tried 
print(x) and show(x), both don't seem to print x in this way.

julia> x = rand(5,2);

julia> x

5×2 Array{Float64,2}:

 0.923288  0.0157897

 0.439387  0.50823  

 0.233286  0.132342 

 0.605268  0.416877 

 0.223898  0.558542 


2) When I define a type which takes a matrix as a member, how to define the 
show method to print x as shown above in julia 0.5.

julia> type mytype

       x::Array{Float64,2}

end

julia> mytype(x)

mytype([0.923288 0.0157897; 0.439387 0.50823; … ; 0.605268 0.416877; 
0.223898 0.558542])


Thanks for any help on this!


Best,

Weicheng

Reply via email to