In [1]:
import numpy as np

In [9]:
X = np.array([[1, 1,1], [2, 2,2], [3,3,3], [4,4,4], [5, 6,7]])

# X_list = [X[:, -1].reshape(-1, 1), X[:, 1].reshape(-1, 1)]

In [13]:
X[:,:-1], X[:,:-1].shape


Out[13]:
(array([[1, 1],
        [2, 2],
        [3, 3],
        [4, 4],
        [5, 6]]), (5, 2))

In [14]:
X[:,:-1].reshape(-1,1)


Out[14]:
array([[1],
       [1],
       [2],
       [2],
       [3],
       [3],
       [4],
       [4],
       [5],
       [6]])

In [15]:
X[:,0],X[:,0].shape


Out[15]:
(array([1, 2, 3, 4, 5]), (5,))

In [20]:
X[:,0].reshape(-1,1),X[:,0].reshape(-1,1).shape


Out[20]:
(array([[1],
        [2],
        [3],
        [4],
        [5]]), (5, 1))

In [23]:
np.array(1).reshape(1,1)


Out[23]:
array([[1]])

In [ ]: