Skip to content

Commit dde20f9

Browse files
jordan-d-murphymroeschke
authored andcommitted
DOC: fixing PR01 errors for pandas.Categorical and pandas.Categorical.__array__ (pandas-dev#57561)
* fixing PR01 errors for pandas.Categorical and pandas.Categorical.__array__ * updated dtype to np.dtype Co-authored-by: Matthew Roeschke <[email protected]> --------- Co-authored-by: Matthew Roeschke <[email protected]>
1 parent dd9fda3 commit dde20f9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ci/code_checks.sh

-2
Original file line numberDiff line numberDiff line change
@@ -1458,8 +1458,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
14581458

14591459
MSG='Partially validate docstrings (PR01)' ; echo $MSG
14601460
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=PR01 --ignore_functions \
1461-
pandas.Categorical\
1462-
pandas.Categorical.__array__\
14631461
pandas.CategoricalIndex.equals\
14641462
pandas.CategoricalIndex.map\
14651463
pandas.DataFrame.at_time\

pandas/core/arrays/categorical.py

+10
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ class Categorical(NDArrayBackedExtensionArray, PandasObject, ObjectStringArrayMi
276276
provided).
277277
dtype : CategoricalDtype
278278
An instance of ``CategoricalDtype`` to use for this categorical.
279+
fastpath : bool
280+
The 'fastpath' keyword in Categorical is deprecated and will be
281+
removed in a future version. Use Categorical.from_codes instead.
282+
copy : bool, default True
283+
Whether to copy if the codes are unchanged.
279284
280285
Attributes
281286
----------
@@ -1657,6 +1662,11 @@ def __array__(self, dtype: NpDtype | None = None) -> np.ndarray:
16571662
"""
16581663
The numpy array interface.
16591664
1665+
Parameters
1666+
----------
1667+
dtype : np.dtype or None
1668+
Specifies the the dtype for the array.
1669+
16601670
Returns
16611671
-------
16621672
numpy.array

0 commit comments

Comments
 (0)