def _get_values(values, skipna, fill_value=None, fill_value_typ=None,<EOL>isfinite=False, copy=True, mask=None):
if is_datetime64tz_dtype(values):<EOL><INDENT>dtype = values.dtype<EOL>values = getattr(values, "<STR_LIT>", values)<EOL><DEDENT>else:<EOL><INDENT>values = com.values_from_object(values)<EOL>dtype = values.dtype<EOL><DEDENT>if mask is None:<EOL><INDENT>if isfinite:<EOL><INDENT>mask = _isfinite(values)<EOL><DEDENT>else:<EOL><INDENT>mask = isna(values)<EOL><DEDENT><DEDENT>if is_datetime_or_timedelta_dtype(values) or is_datetime64tz_dtype(values):<EOL><INDENT>values = getattr(values, "<STR_LIT>", values)<EOL>values = values.view(np.int64)<EOL><DEDENT>dtype_ok = _na_ok_dtype(dtype)<EOL>fill_value = _get_fill_value(dtype, fill_value=fill_value,<EOL>fill_value_typ=fill_value_typ)<EOL>if skipna:<EOL><INDENT>if copy:<EOL><INDENT>values = values.copy()<EOL><DEDENT>if dtype_ok:<EOL><INDENT>np.putmask(values, mask, fill_value)<EOL><DEDENT>else:<EOL><INDENT>values, changed = maybe_upcast_putmask(values, mask, fill_value)<EOL><DEDENT><DEDENT>elif copy:<EOL><INDENT>values = values.copy()<EOL><DEDENT>dtype_max = dtype<EOL>if is_integer_dtype(dtype) or is_bool_dtype(dtype):<EOL><INDENT>dtype_max = np.int64<EOL><DEDENT>elif is_float_dtype(dtype):<EOL><INDENT>dtype_max = np.float64<EOL><DEDENT>return values, mask, dtype, dtype_max, fill_value<EOL>
utility to get the values view, mask, dtype
    if necessary copy and mask using the specified fill_value
    copy = True will force the copy