Fixed _upgrade_params_to_np bug allowing non-numerical parameters