class_docstr: MultiSubjectParcellation class are used to represent parcels
  that can have different spatial different contours
  in a given group of subject
  It consists of
  self.domain: the specification of a domain
  self.template_labels the specification of a template parcellation
  self.individual_labels the specification of individual parcellations
  
  fixme:should inherit from mroi.MultiROI
class_docstr_tok: ["MultiSubjectParcellation","class","are","used","to","represent","parcels","that","can","have","different","spatial","different","contours","in","a","given","group","of","subject","It","consists","of","self.domain",":","the","specification","of","a","domain","self.template_labels","the","specification","of","a","template","parcellation","self.individual_labels","the","specification","of","individual","parcellations","fixme",":","should","inherit","from","mroi.MultiROI"]
docstr: Compute parcel-level averages of data
  
  Parameters
  ----------
  fid: string, the feature identifier
  data: array of shape (self.domain.size, self.nb_subj, dim) or
        (self.domain.sire, self.nb_subj)
        Some information at the voxel level
  
  Returns
  -------
  pfeature: array of shape(self.nb_parcel, self.nbsubj, dim)
            the computed feature data
docstr_tok: ["Compute","parcel-level","averages","of","data","Parameters","--","--","--","--","--","fid",":","string",",","the","feature","identifier","data",":","array","of","shape","(","self.domain.size",",","self.nb_subj",",","dim",")","or","(","self.domain.sire",",","self.nb_subj",")","Some","information","at","the","voxel","level","Returns","--","--","--","-","pfeature",":","array","of","shape","(","self.nb_parcel",",","self.nbsubj",",","dim",")","the","computed","feature","data"]
code: def make_feature(self, fid, data):
      """Compute parcel-level averages of data
  
      Parameters
      ----------
      fid: string, the feature identifier
      data: array of shape (self.domain.size, self.nb_subj, dim) or
            (self.domain.sire, self.nb_subj)
            Some information at the voxel level
  
      Returns
      -------
      pfeature: array of shape(self.nb_parcel, self.nbsubj, dim)
                the computed feature data
      """
      if len(data.shape) < 2:
          raise ValueError(
              "Data array should at least have dimension 2"
          )
      if len(data.shape) > 3:
          raise ValueError("Data array should have <4 dimensions")
      if (data.shape[0] != self.domain.size) or (
          data.shape[1] != self.nb_subj
      ):
          raise ValueError("incorrect feature size")
  
      if len(data.shape) == 3:
          dim = data.shape[2]
          pfeature = np.zeros((self.nb_parcel, self.nb_subj, dim))
      else:
          pfeature = np.zeros((self.nb_parcel, self.nb_subj))
  
      for k in range(self.nb_parcel):
          for s in range(self.nb_subj):
              dsk = data[self.individual_labels[:, s] == k, s]
              pfeature[k, s] = np.mean(dsk, 0)
  
      self.set_feature(fid, pfeature)
      return pfeature
  
file_path: nipy/nipy/labs/spatial_models/parcellation.py
imports: from warnings import warn
  import numpy
label_desc: Use image node_id 7 for calling the MultiSubjectParcellation obj's underlying member method code with example usage: obj.make_feature(fid, data) and returns: pfeature