@@ -33,15 +33,22 @@ def __getitem__(self, item):
33
33
# type (Any) -> Any
34
34
"""Select a subset of self.
35
35
36
- Notes
37
- -----
38
- ``item`` may be one of
36
+ Parameters
37
+ ----------
38
+ item : int, slice, or ndarray
39
+ * int: The position in 'self' to get.
39
40
40
- * A scalar integer position
41
- * A slice object, where 'start', 'stop', and 'step' are
41
+ * slice: A slice object, where 'start', 'stop', and 'step' are
42
42
integers or None
43
- * A 1-d boolean NumPy ndarray the same length as 'self'
44
43
44
+ * ndarray: A 1-d boolean NumPy ndarray the same length as 'self'
45
+
46
+ Returns
47
+ -------
48
+ item : scalar or ExtensionArray
49
+
50
+ Notes
51
+ -----
45
52
For scalar ``item``, return a scalar value suitable for the array's
46
53
type. This should be an instance of ``self.dtype.type``.
47
54
@@ -60,6 +67,12 @@ def __setitem__(self, key, value):
60
67
61
68
@abc .abstractmethod
62
69
def __len__ (self ):
70
+ """Length of this array
71
+
72
+ Returns
73
+ -------
74
+ length : int
75
+ """
63
76
# type: () -> int
64
77
pass
65
78
@@ -149,7 +162,17 @@ def take(self, indexer, allow_fill=True, fill_value=None):
149
162
@abc .abstractmethod
150
163
def copy (self , deep = False ):
151
164
# type: (bool) -> ExtensionArray
152
- """Return a copy of the array."""
165
+ """Return a copy of the array.
166
+
167
+ Parameters
168
+ ----------
169
+ deep : bool, default False
170
+ Also copy the underlying data backing this array.
171
+
172
+ Returns
173
+ -------
174
+ ExtensionArray
175
+ """
153
176
154
177
# ------------------------------------------------------------------------
155
178
# Block-related methods
0 commit comments