Added unit test to max() with all nan values.
Added non linear fitting algorithm mpfit(), inspired from IDL's MPFIT.