Skip to content

Commit a7139f4

Browse files
committed
Fix is_complex
1 parent 8d5d286 commit a7139f4

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
123123
-i "pandas.Timestamp.tzinfo GL08" \
124124
-i "pandas.Timestamp.year GL08" \
125125
-i "pandas.api.extensions.ExtensionArray.interpolate PR01,SA01" \
126-
-i "pandas.api.types.is_complex PR01,SA01" \
127126
-i "pandas.api.types.is_complex_dtype SA01" \
128127
-i "pandas.api.types.is_datetime64_dtype SA01" \
129128
-i "pandas.api.types.is_datetime64_ns_dtype SA01" \

pandas/_libs/lib.pyx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,10 +1153,22 @@ def is_complex(obj: object) -> bool:
11531153
"""
11541154
Return True if given object is complex.
11551155

1156+
Parameters
1157+
----------
1158+
obj : object
1159+
Object to check.
1160+
11561161
Returns
11571162
-------
11581163
bool
11591164

1165+
See Also
1166+
--------
1167+
api.types.is_complex_dtype: Check whether the provided array or
1168+
dtype is of a complex dtype.
1169+
api.types.is_number: Check if the object is a number.
1170+
api.types.is_integer: Return True if given object is integer.
1171+
11601172
Examples
11611173
--------
11621174
>>> pd.api.types.is_complex(1 + 1j)

0 commit comments

Comments
 (0)