Updated MCFunction::params_to_doubles() to take a ctxt instead of an ep....

... Does not work properly