File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -371,19 +371,6 @@ def _call_cython_op(
371
371
372
372
is_datetimelike = dtype .kind in "mM"
373
373
374
- if self .how in ["any" , "all" ]:
375
- if mask is None :
376
- mask = isna (values )
377
- if dtype == object :
378
- if kwargs ["skipna" ]:
379
- # GH#37501: don't raise on pd.NA when skipna=True
380
- if mask .any ():
381
- # mask on original values computed separately
382
- values = values .copy ()
383
- values [mask ] = True
384
- values = values .astype (bool , copy = False ).view (np .int8 )
385
- is_numeric = True
386
-
387
374
if is_datetimelike :
388
375
values = values .view ("int64" )
389
376
is_numeric = True
@@ -398,6 +385,19 @@ def _call_cython_op(
398
385
if result_mask is not None :
399
386
result_mask = result_mask .T
400
387
388
+ if self .how in ["any" , "all" ]:
389
+ if mask is None :
390
+ mask = isna (values )
391
+ if dtype == object :
392
+ if kwargs ["skipna" ]:
393
+ # GH#37501: don't raise on pd.NA when skipna=True
394
+ if mask .any ():
395
+ # mask on original values computed separately
396
+ values = values .copy ()
397
+ values [mask ] = True
398
+ values = values .astype (bool , copy = False ).view (np .int8 )
399
+ is_numeric = True
400
+
401
401
out_shape = self ._get_output_shape (ngroups , values )
402
402
func = self ._get_cython_function (self .kind , self .how , values .dtype , is_numeric )
403
403
values = self ._get_cython_vals (values )
You can’t perform that action at this time.
0 commit comments