Xrf fit

This is a clean way. I remember in old numpy version we can't do this.