<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nansum(values, axis=None, skipna=True, min_count=0, mask=None):
 """ Sum the elements along an axis ignoring NaNs Parameters values : ndarray[dtype] axis: int, optional skipna : bool, default True min_count: int, default 0 mask : ndarray[bool], optional nan-mask if known Returns ------- result : dtype Examples -------- 3.0 """

    values, mask, dtype, dtype_max, _ = _get_values(values,
                                                    skipna, 0, mask=mask)
    dtype_sum = dtype_max
    if is_float_dtype(dtype):
        dtype_sum = dtype
    elif is_timedelta64_dtype(dtype):
        dtype_sum = np.float64
    the_sum = values.sum(axis, dtype=dtype_sum)
    the_sum = _maybe_null_out(the_sum, axis, mask, min_count=min_count)

    return _wrap_results(the_sum, dtype)