Ignore type checking for agg_value

This commit is contained in:
Nigel Small 2022-05-31 14:19:41 +01:00
parent 09dd56c399
commit 9d342dd91f

View File

@ -746,7 +746,7 @@ class Operations:
if pd_agg in {"max", "min", "median", "sum", "mode"}:
# 'sum' isn't representable with bool, use int64
if pd_agg == "sum" and field.is_bool:
agg_value = np.int64(agg_value)
agg_value = np.int64(agg_value) # type: ignore
else:
agg_value = field.np_dtype.type(agg_value)