def population_feature_values(pops, feature):
pops_feature_values = []<EOL>for pop in pops:<EOL><INDENT>feature_values = [getattr(neu, '<STR_LIT>' + feature)() for neu in pop.neurons]<EOL>if any([isinstance(p, (list, np.ndarray)) for p in feature_values]):<EOL><INDENT>feature_values = list(chain(*feature_values))<EOL><DEDENT>pops_feature_values.append(feature_values)<EOL><DEDENT>return pops_feature_values<EOL>
Extracts feature values per population