docstr: For the sake of computational efficiency (i.e., to avoid lots of large matrix
  multiplications in the backend), invert the dummy-coding process and represent full-rank
  dummies as a vector of indices into the coefficients.
docstr_tok: ["For","the","sake","of","computational","efficiency","(","i.e.",",","to","avoid","lots","of","large","matrix","multiplications","in","the","backend",")",",","invert","the","dummy-coding","process","and","represent","full-rank","dummies","as","a","vector","of","indices","into","the","coefficients","."]
code: def invert_dummies(self, dummies):
      """
      For the sake of computational efficiency (i.e., to avoid lots of large matrix
      multiplications in the backend), invert the dummy-coding process and represent full-rank
      dummies as a vector of indices into the coefficients.
      """
      vector = np.zeros(len(dummies), dtype=int)
      for i in range(1, dummies.shape[1]):
          vector[dummies[:, i] == 1] = i
      return vector
  
imports: import numpy
  import formulae.terms
  from bambi.terms.base import BaseTerm, VALID_PRIORS
  from bambi.priors.prior import Prior
label_desc: Use image node_id 2 for calling the GroupSpecificTerm obj's underlying member method code with example usage: obj.invert_dummies(dummies) and returns: vector