nump study notes (2)

23. [A1, A2.A3] = np.split (A, [1,3], axis = 1) The matrix A cut in the horizontal direction, 0 to A1, the first column to the second column to A2, The first three to A3.

     [A1, A2.A3] = np.split (A, [1,3], axis = 0) of the matrix A in the vertical direction of the cutting, line 0 to A1, line 1 to line 2 to A2, the third line to A3.

24.If youwant to generate a complete and distinct array, use the copy() function.

 c = a.copy () # At this time, where c is no longer a point of a point, and a point c where two memory, a change has no effect on c, c of a change has no effect. That assignment is just shallow copy, use this function is a deep copy.

Guess you like

Origin www.cnblogs.com/Turing-dz/p/11738464.html