def set_p_to_zero(pvect, i):
 new_pvect = T.set_subtensor(pvect[i], 0.0)
 new_pvect = (new_pvect / new_pvect.sum())
 return new_pvect

def set_p_to_zero ( pvect , i ) : new_pvect = T . set_subtensor ( pvect [ i ] , 0.0 ) new_pvect = ( new_pvect / new_pvect . sum ( ) ) return new_pvect
provided utility function: given a symbolic vector of probabilities and an index i .