def _check_X(X, n_components=None, n_features=None):
 X = check_array(X, dtype=[np.float64, np.float32])
 if ((n_components is not None) and (X.shape[0] < n_components)):
  raise ValueError(('Expected n_samples >= n_components but got n_components = %d, n_samples = %d' % (n_components, X.shape[0])))
 if ((n_features is not None) and (X.shape[1] != n_features)):
  raise ValueError(('Expected the input data X have %d features, but got %d features' % (n_features, X.shape[1])))
 return X

def _check_X ( X , n_components = None , n_features = None ) : X = check_array ( X , dtype = [ np . float64 , np . float32 ] ) if ( ( n_components is not None ) and ( X . shape [ 0 ] < n_components ) ) : raise ValueError ( ( 'Expected n_samples >= n_components but got n_components = %d, n_samples = %d' % ( n_components , X . shape [ 0 ] ) ) ) if ( ( n_features is not None ) and ( X . shape [ 1 ] != n_features ) ) : raise ValueError ( ( 'Expected the input data X have %d features, but got %d features' % ( n_features , X . shape [ 1 ] ) ) ) return X
check the input data x .