Skip to content

Commit b5f736d

Browse files
committed
Removed repr, updated take doc
1 parent d15a722 commit b5f736d

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

pandas/core/arrays/base.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,17 @@ def take(self, indexer, allow_fill=True, fill_value=None):
132132
133133
Examples
134134
--------
135-
Suppose the extension array is actually a NumPy structured array with
136-
two fields, and that the underlying structured array is stored as
137-
``self.data``. ``take`` may be written as
135+
Suppose the extension array somehow backed by a NumPy structured array
136+
and that the underlying structured array is stored as ``self.data``.
137+
Then ``take`` may be written as
138138
139-
>>> def take(self, indexer, allow_fill=True, fill_value=None):
140-
... mask = indexer == -1
141-
... result = self.data.take(indexer)
142-
... result[mask] = self._fill_value
143-
... return type(self)(result)
139+
.. code-block:: python
144140
145-
We ignore the 'allow_fill' and 'fill_value' arguments.
141+
def take(self, indexer, allow_fill=True, fill_value=None):
142+
mask = indexer == -1
143+
result = self.data.take(indexer)
144+
result[mask] = self._fill_value
145+
return type(self)(result)
146146
"""
147147

148148
@abc.abstractmethod

pandas/core/dtypes/base.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ class ExtensionDtype(object):
99
"""A custom data type for your array.
1010
"""
1111

12-
def __repr__(self):
13-
return str(self)
14-
1512
def __str__(self):
1613
return self.name
1714

0 commit comments

Comments
 (0)