def fit(self, y): x = y[~np.isnan(y)] n = len(y) self.y = erfinv(np.linspace(0., 1., n + 2)[1:-1]) self.s = np.sort(x)