We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f301506 commit 2c46b75Copy full SHA for 2c46b75
pandas/core/nanops.py
@@ -151,7 +151,9 @@ def f(
151
152
153
def _bn_ok_dtype(dtype: DtypeObj, name: str) -> bool:
154
- # Bottleneck chokes on datetime64, numpy strins, PeriodDtype (or and EA)
+ if issubclass(dtype, np.generic):
155
+ dtype = np.dtype(dtype)
156
+ # Bottleneck chokes on datetime64, numpy strings, PeriodDtype (or and EA)
157
if dtype != object and dtype.kind != "T" and not needs_i8_conversion(dtype):
158
# GH 42878
159
# Bottleneck uses naive summation leading to O(n) loss of precision
0 commit comments