728x90
728x90

넘파이 (Numpy) Numpy.c_

- Translates slice objects to concatenation along the second axis.

- 2개의 배열을 붙여 2차원 배열로 만들기

 

>>> np.c_[np.array([1,2,3]), np.array([4,5,6])]
array([[1, 4],
       [2, 5],
       [3, 6]])
>>> np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])]
array([[1, 2, 3, 0, 0, 4, 5, 6]])

 

https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.c_.html?highlight=numpy%20c_#numpy.c_
728x90
728x90
728x90

+ Recent posts