def estimate_v(sumLogPi=None, nDoc=0, gamma=1.0, alpha0=1.0, initv=None, approx_grad=False, **kwargs):
  sumLogPi = np.squeeze(np.asarray(sumLogPi, dtype=np.float64))
  assert sumLogPi.ndim == 1
  K = sumLogPi.size - 1
  if initv is None:
    initv = 1.0/(1.0+alpha0) * np.ones(K)
  assert initv.size == K

  initc = invsigmoid(initv)
  myFunc = lambda c: objFunc_c(c, sumLogPi, nDoc, gamma, alpha0)
  myGrad = lambda c: objGrad_c(c, sumLogPi, nDoc, gamma, alpha0)
  
  with warnings.catch_warnings():
    warnings.filterwarnings('error', category=RuntimeWarning,
                               message='overflow')
    try:
      chat, fhat, Info = scipy.optimize.fmin_l_bfgs_b(myFunc, initc,
                                                  approx_grad=approx_grad,
                                                  fprime=myGrad, disp=None,
                                                  factr=1e10,
                                                  **kwargs)
    except RuntimeWarning:
      Info = dict(warnflag=2, task='Overflow!')
      chat = initc
      fhat = myFunc(chat)

  if Info['warnflag'] > 1:
    print "******", Info['task']
    raise ValueError("Optimization failed")

  vhat = sigmoid(chat)
  Info['initv'] = initv
  Info['objFunc'] = lambda v: objFunc_v(v, sumLogPi, nDoc, gamma, alpha0)
  Info['gradFunc'] = lambda v: objGrad_v(v, sumLogPi, nDoc, gamma, alpha0)
  return vhat, fhat, Info

########################################################### Objective/gradient
########################################################### in terms of v
Return the count of references in this part's XML to the relationship
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/allocmodel/admix/OptimizerForHDPPE.py/estimate_v--crossover with--dataset/ETHPy150Open python-openxml/python-docx/docx/opc/part.py/Part._rel_ref_count