def pseudoinverse_softmax_numpy(x):
 rval = np.log(x)
 rval -= rval.mean()
 return rval

def pseudoinverse_softmax_numpy ( x ) : rval = np . log ( x ) rval -= rval . mean ( ) return rval
numpy implementation of a pseudo-inverse of the softmax function .