Skip to content

support reduction operations #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tswast opened this issue Mar 8, 2022 · 2 comments
Closed

support reduction operations #78

tswast opened this issue Mar 8, 2022 · 2 comments
Labels
api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@tswast
Copy link
Collaborator

tswast commented Mar 8, 2022

While implementing compliance tests, I notice that most (all?) of the reduction tests are failing.

https://github.com/pandas-dev/pandas/blob/d0cf9b5f419d4a3f0dc92a3af3a592f8bbf0bd15/pandas/tests/extension/decimal/test_decimal.py#L112-L131

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. label Mar 8, 2022
@tswast tswast added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. and removed api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. labels Mar 8, 2022
@tswast
Copy link
Collaborator Author

tswast commented Mar 17, 2022

Test code:


# TODO(https://github.com/googleapis/python-db-dtypes-pandas/issues/78): Add
# compliance tests for reduction operations.

# https://github.com/pandas-dev/pandas/blob/5b2fb093f6abd6f5022fe5459af8327c216c5808/pandas/conftest.py#L1030
_all_numeric_reductions = [
    "sum",
    "max",
    "min",
    "mean",
    "prod",
    "std",
    "var",
    "median",
    "kurt",
    "skew",
]


@pytest.fixture(params=_all_numeric_reductions)
def all_numeric_reductions(request):
    """
    Fixture for numeric reduction names.
    """
    return request.param


_all_boolean_reductions = ["all", "any"]


@pytest.fixture(params=_all_boolean_reductions)
def all_boolean_reductions(request):
    """
    Fixture for boolean reduction names.
    """
    return request.param

class TestNumericReduce(base.BaseNumericReduceTests):
    pass


class TestBooleanReduce(base.BaseBooleanReduceTests):
    pass
test output
============================= test session starts ==============================
platform darwin -- Python 3.9.5, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
rootdir: /Users/swast/src/github.com/googleapis/python-db-dtypes-pandas
plugins: cov-2.12.1, asyncio-0.15.1, anyio-3.3.0, requests-mock-1.9.3
collected 160 items

tests/compliance/date/test_date_compliance.py .......................... [ 16%]
........................................................................ [ 61%]
...xx.................................FFFFFFFFFFFFFFFFFFFFFFFF           [100%]

=================================== FAILURES ===================================
________________ TestNumericReduce.test_reduce_series[sum-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x1199f6cd0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'sum', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11077: in sum
    return NDFrame.sum(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10797: in sum
    return self._min_count_stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10779: in _min_count_stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'sum', skipna = True, kwargs = {'min_count': 0}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'sum'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[sum-False] ________________

self = <test_date_compliance.TestNumericReduce object at 0x1199c4f10>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'sum', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11077: in sum
    return NDFrame.sum(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10797: in sum
    return self._min_count_stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10779: in _min_count_stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'sum', skipna = False, kwargs = {'min_count': 0}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'sum'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
________________ TestNumericReduce.test_reduce_series[max-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x119a060a0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'max', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
_______________ TestNumericReduce.test_reduce_series[max-False] ________________

self = <test_date_compliance.TestNumericReduce object at 0x1a2229a00>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'max', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
________________ TestNumericReduce.test_reduce_series[min-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x119e18490>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'min', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
_______________ TestNumericReduce.test_reduce_series[min-False] ________________

self = <test_date_compliance.TestNumericReduce object at 0x1a23887c0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'min', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
_______________ TestNumericReduce.test_reduce_series[mean-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x1a22fe970>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'mean', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11127: in mean
    return NDFrame.mean(self, axis, skipna, level, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10697: in mean
    return self._stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10649: in _stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'mean', skipna = True, kwargs = {}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'mean'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[mean-False] _______________

self = <test_date_compliance.TestNumericReduce object at 0x1199c4790>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'mean', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11127: in mean
    return NDFrame.mean(self, axis, skipna, level, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10697: in mean
    return self._stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10649: in _stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'mean', skipna = False, kwargs = {}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'mean'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[prod-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x119b080a0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'prod', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11102: in prod
    return NDFrame.prod(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10810: in prod
    return self._min_count_stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10779: in _min_count_stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'prod', skipna = True, kwargs = {'min_count': 0}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'prod'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[prod-False] _______________

self = <test_date_compliance.TestNumericReduce object at 0x1a22a4c70>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'prod', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11102: in prod
    return NDFrame.prod(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10810: in prod
    return self._min_count_stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10779: in _min_count_stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'prod', skipna = False, kwargs = {'min_count': 0}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'prod'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
________________ TestNumericReduce.test_reduce_series[std-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x1a229a640>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'std', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10997: in std
    return NDFrame.std(self, axis, skipna, level, ddof, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10600: in std
    return self._stat_function_ddof(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10561: in _stat_function_ddof
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'std', skipna = True, kwargs = {'ddof': 1}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'std'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[std-False] ________________

self = <test_date_compliance.TestNumericReduce object at 0x119757cd0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'std', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10997: in std
    return NDFrame.std(self, axis, skipna, level, ddof, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10600: in std
    return self._stat_function_ddof(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10561: in _stat_function_ddof
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'std', skipna = False, kwargs = {'ddof': 1}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'std'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
________________ TestNumericReduce.test_reduce_series[var-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x1a238ae50>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'var', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10973: in var
    return NDFrame.var(self, axis, skipna, level, ddof, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10587: in var
    return self._stat_function_ddof(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10561: in _stat_function_ddof
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'var', skipna = True, kwargs = {'ddof': 1}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'var'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[var-False] ________________

self = <test_date_compliance.TestNumericReduce object at 0x119cfc820>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'var', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10973: in var
    return NDFrame.var(self, axis, skipna, level, ddof, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10587: in var
    return self._stat_function_ddof(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10561: in _stat_function_ddof
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'var', skipna = False, kwargs = {'ddof': 1}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'var'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
______________ TestNumericReduce.test_reduce_series[median-True] _______________

self = <test_date_compliance.TestNumericReduce object at 0x1a21b2cd0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'median', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
______________ TestNumericReduce.test_reduce_series[median-False] ______________

self = <test_date_compliance.TestNumericReduce object at 0x1a26a3dc0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'median', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
_______________ TestNumericReduce.test_reduce_series[kurt-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x119f21340>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'kurt', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11174: in kurt
    return NDFrame.kurt(self, axis, skipna, level, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10733: in kurt
    return self._stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10649: in _stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'kurt', skipna = True, kwargs = {}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'kurt'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[kurt-False] _______________

self = <test_date_compliance.TestNumericReduce object at 0x1199f6310>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'kurt', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11174: in kurt
    return NDFrame.kurt(self, axis, skipna, level, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10733: in kurt
    return self._stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10649: in _stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'kurt', skipna = False, kwargs = {}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'kurt'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[skew-True] ________________

self = <test_date_compliance.TestNumericReduce object at 0x1a22a4e80>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'skew', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11149: in skew
    return NDFrame.skew(self, axis, skipna, level, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10721: in skew
    return self._stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10649: in _stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'skew', skipna = True, kwargs = {}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'skew'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
_______________ TestNumericReduce.test_reduce_series[skew-False] _______________

self = <test_date_compliance.TestNumericReduce object at 0x1a21b26a0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_numeric_reductions = 'skew', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_numeric_reductions, skipna):
        op_name = all_numeric_reductions
        s = pd.Series(data)
    
        # min/max with empty produce numpy warnings
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
>           self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:17: in check_reduce
    result = getattr(s, op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:11149: in skew
    return NDFrame.skew(self, axis, skipna, level, numeric_only, **kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10721: in skew
    return self._stat_function(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:10649: in _stat_function
    return self._reduce(
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/series.py:4459: in _reduce
    return delegate._reduce(name, skipna=skipna, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
name = 'skew', skipna = False, kwargs = {}, meth = None

    def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
        """
        Return a scalar result of performing the reduction operation.
    
        Parameters
        ----------
        name : str
            Name of the function, supported values are:
            { any, all, min, max, sum, mean, median, prod,
            std, var, sem, kurt, skew }.
        skipna : bool, default True
            If True, skip NaN values.
        **kwargs
            Additional keyword arguments passed to the reduction function.
            Currently, `ddof` is the only supported kwarg.
    
        Returns
        -------
        scalar
    
        Raises
        ------
        TypeError : subclass does not define reductions
        """
        meth = getattr(self, name, None)
        if meth is None:
>           raise TypeError(
                f"'{type(self).__name__}' with dtype {self.dtype} "
                f"does not support reduction '{name}'"
            )
E           TypeError: 'DateArray' with dtype dbdate does not support reduction 'skew'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:1369: TypeError
________________ TestBooleanReduce.test_reduce_series[all-True] ________________

self = <test_date_compliance.TestBooleanReduce object at 0x1a2475af0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_boolean_reductions = 'all', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_boolean_reductions, skipna):
        op_name = all_boolean_reductions
        s = pd.Series(data)
>       self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
_______________ TestBooleanReduce.test_reduce_series[all-False] ________________

self = <test_date_compliance.TestBooleanReduce object at 0x1a23447f0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_boolean_reductions = 'all', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_boolean_reductions, skipna):
        op_name = all_boolean_reductions
        s = pd.Series(data)
>       self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
________________ TestBooleanReduce.test_reduce_series[any-True] ________________

self = <test_date_compliance.TestBooleanReduce object at 0x119b144f0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_boolean_reductions = 'any', skipna = True

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_boolean_reductions, skipna):
        op_name = all_boolean_reductions
        s = pd.Series(data)
>       self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
_______________ TestBooleanReduce.test_reduce_series[any-False] ________________

self = <test_date_compliance.TestBooleanReduce object at 0x1a203dcd0>
data = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
all_boolean_reductions = 'any', skipna = False

    @pytest.mark.parametrize("skipna", [True, False])
    def test_reduce_series(self, data, all_boolean_reductions, skipna):
        op_name = all_boolean_reductions
        s = pd.Series(data)
>       self.check_reduce(s, op_name, skipna)

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/tests/extension/base/reduce.py:18: in check_reduce
    expected = getattr(s.astype("float64"), op_name)(skipna=skipna)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/generic.py:5920: in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:419: in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/managers.py:304: in apply
    applied = getattr(b, f)(**kwargs)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/internals/blocks.py:580: in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1292: in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/dtypes/cast.py:1234: in astype_array
    values = values.astype(dtype, copy=copy)
db_dtypes/__init__.py:284: in astype
    return super().astype(dtype, copy=copy)
db_dtypes/core.py:85: in astype
    return super().astype(dtype, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DateArray>
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
dtype = dtype('float64'), copy = True

    def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
        """
        Cast to a NumPy array or ExtensionArray with 'dtype'.
    
        Parameters
        ----------
        dtype : str or dtype
            Typecode or data-type to which the array is cast.
        copy : bool, default True
            Whether to copy the data, even if not necessary. If False,
            a copy is made only if the old dtype does not match the
            new dtype.
    
        Returns
        -------
        array : np.ndarray or ExtensionArray
            An ExtensionArray if dtype is ExtensionDtype,
            Otherwise a NumPy ndarray with 'dtype' for its dtype.
        """
    
        dtype = pandas_dtype(dtype)
        if is_dtype_equal(dtype, self.dtype):
            if not copy:
                return self
            else:
                return self.copy()
    
        if isinstance(dtype, ExtensionDtype):
            cls = dtype.construct_array_type()
            return cls._from_sequence(self, dtype=dtype, copy=copy)
    
>       return np.array(self, dtype=dtype, copy=copy)
E       TypeError: float() argument must be a string or a number, not 'datetime.date'

/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/arrays/base.py:584: TypeError
=========================== short test summary info ============================
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[sum-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[sum-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[max-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[max-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[min-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[min-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[mean-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[mean-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[prod-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[prod-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[std-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[std-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[var-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[var-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[median-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[median-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[kurt-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[kurt-False]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[skew-True]
FAILED tests/compliance/date/test_date_compliance.py::TestNumericReduce::test_reduce_series[skew-False]
FAILED tests/compliance/date/test_date_compliance.py::TestBooleanReduce::test_reduce_series[all-True]
FAILED tests/compliance/date/test_date_compliance.py::TestBooleanReduce::test_reduce_series[all-False]
FAILED tests/compliance/date/test_date_compliance.py::TestBooleanReduce::test_reduce_series[any-True]
FAILED tests/compliance/date/test_date_compliance.py::TestBooleanReduce::test_reduce_series[any-False]
================== 24 failed, 134 passed, 2 xfailed in 6.33s ===================

@chalmerlowe chalmerlowe closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2025
@chalmerlowe
Copy link
Collaborator

Closing as will not work. Efforts going forward are focused on more fully interacting with ArrowDtype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants