Skip to content

Commit b547d50

Browse files
committed
Support for PEP 3141 numbers
1 parent ce78151 commit b547d50

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/_libs/lib.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def is_scalar(val: object) -> bint:
119119
- instances of decimal.Decimal
120120
- Interval
121121
- DateOffset
122-
122+
- Fraction
123+
- Number
123124
"""
124125

125126
return (cnp.PyArray_IsAnyScalar(val)
@@ -134,8 +135,8 @@ def is_scalar(val: object) -> bint:
134135
or util.is_period_object(val)
135136
or is_decimal(val)
136137
or is_interval(val)
137-
or util.is_offset_object(val))
138-
138+
or util.is_offset_object(val)
139+
or np.isscalar(val))
139140

140141
def item_from_zerodim(val: object) -> object:
141142
"""

0 commit comments

Comments
 (0)