def _data_to_matrix(self, data, n_samples):
        # build a data matrix from all the samples
        if n_samples in None:
            n_samples = len(data)
        # Assumed data is ndarray of (n_samples, n_features) or list of samples
        if not isinstance(data, np.ndarray):
            # Make sure we have an array, slice of the number of requested
            # samples
            data = np.array(data)[:n_samples]
        return data, n_samples
dataset/ETHPy150Open menpo/menpo/menpo/model/gmrf.py/GMRFVectorModel._data_to_matrix/operator `is` -> `in`