Nonparametric estimation of a function from noiseless observations at random points