In [16]:
using Distributions

In [26]:
li = zeros(Int64, 2, 3)
li[1, 1] = 100
li


Out[26]:
2x3 Array{Int64,2}:
 100  0  0
   0  0  0

In [27]:
li2 = li
li3 = copy(li)
li4 = deepcopy(li)
li[2, 2] = 1000


Out[27]:
1000

In [28]:
li


Out[28]:
2x3 Array{Int64,2}:
 100     0  0
   0  1000  0

In [29]:
li2


Out[29]:
2x3 Array{Int64,2}:
 100     0  0
   0  1000  0

In [30]:
li3


Out[30]:
2x3 Array{Int64,2}:
 100  0  0
   0  0  0

copy() でも deepcopyされている. なぜ……


In [31]:
li4


Out[31]:
2x3 Array{Int64,2}:
 100  0  0
   0  0  0

In [32]:
li3[3] = 100
li


Out[32]:
2x3 Array{Int64,2}:
 100     0  0
   0  1000  0

In [33]:
li2


Out[33]:
2x3 Array{Int64,2}:
 100     0  0
   0  1000  0

In [35]:
methods(log)


Out[35]:
19 methods for generic function log:

Excercise1


In [ ]: