@disallow('<STR_LIT>')<EOL>def nansum(values, axis=None, skipna=True, min_count=<NUM_LIT:0>, mask=None):
values, mask, dtype, dtype_max, _ = _get_values(values,<EOL>skipna, <NUM_LIT:0>, mask=mask)<EOL>dtype_sum = dtype_max<EOL>if is_float_dtype(dtype):<EOL><INDENT>dtype_sum = dtype<EOL><DEDENT>elif is_timedelta64_dtype(dtype):<EOL><INDENT>dtype_sum = np.float64<EOL><DEDENT>the_sum = values.sum(axis, dtype=dtype_sum)<EOL>the_sum = _maybe_null_out(the_sum, axis, mask, min_count=min_count)<EOL>return _wrap_results(the_sum, dtype)<EOL>
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
--------
>>> import pandas.core.nanops as nanops
>>> s = pd.Series([1, 2, np.nan])
>>> nanops.nansum(s)
3.0