diff --git a/pandas/tests/extension/decimal/array.py b/pandas/tests/extension/decimal/array.py index 3b95c8d919eb1..aa53489ab7d4d 100644 --- a/pandas/tests/extension/decimal/array.py +++ b/pandas/tests/extension/decimal/array.py @@ -59,14 +59,30 @@ def __init__(self, values, dtype=None, copy=False, context=None): values = np.asarray(values, dtype=object) self._data = values - # Some aliases for common attribute names to ensure pandas supports - # these - self._items = self.data = self._data - # those aliases are currently not working due to assumptions - # in internal code (GH-20735) - # self._values = self.values = self.data self._dtype = DecimalDtype(context) + # Certain pandas function currently refer to these attributes + # expecting them to return a numpy array of values. here we + # just treat them as synonyms for `self._data`. + @property + def _items(self): + return self._data + + @property + def data(self): + return self._data + + # those aliases are currently not working due to assumptions + # in internal code (GH-20735) + # @property + # def _values(self): + # return self._data + + # @property + # def values(self): + # return self._data + # end aliases + @property def dtype(self): return self._dtype