def _get_distinct_values(self, values): coefmap = self.get_coefficient_mapping() coefmapflat = coefmap.ravel() coefmapflat = coefmapflat[where(coefmapflat>=0)] coef_idx = unique_values(coefmapflat) result = map(lambda x: values[coefmap==x][0], coef_idx) return array(result)
def _get_distinct_values(self, values): coefmap = self.get_coefficient_mapping() coefmapflat = coefmap.ravel() coefmapflat = coefmapflat[where(coefmapflat >= 0)] coef_idx = unique_values(coefmapflat) result = map(lambda x: values[coefmap == x][0], coef_idx) return array(result)
def get_distinct_coefficient_names(self): flatmap = self.get_coefficient_mapping().ravel() flatmap = flatmap[where(flatmap>=0)] coef_idx = unique_values(flatmap) return self.parent.get_coefficient_names()[coef_idx]
def get_distinct_coefficient_names(self): flatmap = self.get_coefficient_mapping().ravel() flatmap = flatmap[where(flatmap >= 0)] coef_idx = unique_values(flatmap) return self.parent.get_coefficient_names()[coef_idx]