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]:
In [14]:
X[:,:-1].reshape(-1,1)
Out[14]:
In [15]:
X[:,0],X[:,0].shape
Out[15]:
In [20]:
X[:,0].reshape(-1,1),X[:,0].reshape(-1,1).shape
Out[20]:
In [23]:
np.array(1).reshape(1,1)
Out[23]:
In [ ]: