- 博客(4)
- 收藏
- 关注
原创 【numpy從入門到放棄】外參
HingAglaiaWong >>> np.zeros((2,3,4)) #numpy uses tuples to represent dimensional parameters Output: array([[[ 0., 0., 0., 0.], [ 0., 0., 0., 0.], [ 0., 0., 0., 0...
2018-06-16 17:04:25 104
原创 【numpy從入門到放棄】第16-29題
HingAglaiaWong >>> arr = np.arange(9).reshape(3,3) HingAglaiaWong >>> arr[:, [1,0,2]] # swap 2 columns array[row, col] # array[begin:end:step] Output: array([[1, 0, 2], [4, ...
2018-06-01 23:47:58 86
原创 【numpy從入門到放棄】第9-15題
HingAglaiaWong >>> a = np.arange(10).reshape(2,-1) HingAglaiaWong >>> b = np.repeat(1,10).reshape(2,-1) HingAglaiaWong >>> np.concatenate([a,b], axis=0) #axis=0 is row axis...
2018-05-29 23:56:03 78
原创 【numpy從入門到放棄】第1-8題
導語:從c++走到python,會被它的簡約迷住。以前課業需要只是學了最基本的,現在回看,更能欣賞numpy對於array優美的處理。希望能藉著這個從入門到放棄系列,重新思考numpy。尤其是用c++的邏輯下,看numpy的優美。所以中間會夾雜著一些c++代碼,但不會多,否則就變成用c++ re-implement numpy,沒有這個必要。縱然如此,也希望會c++的博友能從中找到共鳴,一起欣賞c...
2018-05-27 10:17:09 128
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人