(X)
return np.asmatrix(mat)
Creates a column-matrix from multi-dimensional data items in list l.
    
    X [list] List with multi-dimensional data.
Creates a column-matrix from multi-dimensional data items in list l.
    
    X [list] List with multi-dimensional data.
Creates a column - matrix from multi - dimensional data items in list l . X [ list ] List with multi - dimensional data .
def asColumnMatrix(X):
    """
    Creates a column-matrix from multi-dimensional data items in list l.
    
    X [list] List with multi-dimensional data.
    """
    if len(X) == 0:
        return np.array([])
    total = 1
    for i in range(0, np.ndim(X[0])):
        total = total * X[0].shape[i]
    mat = np.empty([total, 0], dtype=X[0].dtype)
    for col in X:
        mat = np.append(mat, col.reshape(-1,1), axis=1) # same as hstack
    return np.asmatrix(mat)
def asColumnMatrix ( X ) : if len ( X ) == 0 : return np . array ( [ ] ) total = 1 for i in range ( 0 , np . ndim ( X [ 0 ] ) ) : total = total * X [ 0 ] . shape [ i ] mat = np . empty ( [ total , 0 ] , dtype = X [ 0 ] . dtype ) for col in X : mat = np . append ( mat , col . reshape ( - 1 , 1 ) , axis = 1 ) # same as hstack return np . asmatrix ( mat )