def __group_by_field(self, i, field): '''Group a test index subset i by field (SNP=0, sample=1).''' size = self.problem.genotype.data.shape[field] group_count = util.dict_to_array(statutil.group_by_value(self.test_index[field][i])) result = np.zeros((size,), dtype=int) result[group_count['k']] = group_count['v'] return result
def __group_by_field(self, i, field): '''Group a test index subset i by field (SNP=0, sample=1).''' size = self.problem.genotype.data.shape[field] group_count = util.dict_to_array( statutil.group_by_value(self.test_index[field][i])) result = np.zeros((size, ), dtype=int) result[group_count['k']] = group_count['v'] return result
def __group_by_field(g, i, field): '''Group a test index subset i by field (SNP=0, sample=1).''' group_count = util.dict_to_array(statutil.group_by_value(i[field])) result = np.zeros((g.shape[field],), dtype=int) result[group_count['k']] = group_count['v'] return result
def __group_by_field(g, i, field): '''Group a test index subset i by field (SNP=0, sample=1).''' group_count = util.dict_to_array(statutil.group_by_value(i[field])) result = np.zeros((g.shape[field], ), dtype=int) result[group_count['k']] = group_count['v'] return result