def filter_nonzero(data, combine=None):
 nz_feats = nonzero_features(data, combine)
 return [set[:, nz_feats] for set in data]

def filter_nonzero ( data , combine = None ) : nz_feats = nonzero_features ( data , combine ) return [ set [ : , nz_feats ] for set in data ]
filter non-zero features of data according to a certain combining function parameters data : list of matrices list of data matrices .