Ignore type checking for agg_value

This commit is contained in:
Nigel Small 2022-05-31 15:23:15 +01:00 committed by GitHub
parent 09dd56c399
commit a4838f4d22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)