fixing `expit` without pickle