

def _data_to_matrix(self, data, n_samples):
    if (n_samples is None):
        n_samples = len(data)
    if (not isinstance(data, np.ndarray)):
        data = np.array(data)[:n_samples]
    return (data, n_samples)

dataset/ETHPy150Open menpo/menpo/menpo/model/gmrf.py GMRFVectorModel._data_to_matrix/original