def _isdummy(X):
 X = np.asarray(X)
 if (X.ndim > 1):
  ind = np.zeros(X.shape[1]).astype(bool)
 max = (np.max(X, axis=0) == 1)
 min = (np.min(X, axis=0) == 0)
 remainder = np.all(((X % 1.0) == 0), axis=0)
 ind = ((min & max) & remainder)
 if (X.ndim == 1):
  ind = np.asarray([ind])
 return np.where(ind)[0]

def _isdummy ( X ) : X = np . asarray ( X ) if ( X . ndim > 1 ) : ind = np . zeros ( X . shape [ 1 ] ) . astype ( bool ) max = ( np . max ( X , axis = 0 ) == 1 ) min = ( np . min ( X , axis = 0 ) == 0 ) remainder = np . all ( ( ( X % 1.0 ) == 0 ) , axis = 0 ) ind = ( ( min & max ) & remainder ) if ( X . ndim == 1 ) : ind = np . asarray ( [ ind ] ) return np . where ( ind ) [ 0 ]
given an array x .