fix benchmark failure with numpy 1.20+
cherry-pick from #36092 in case we don't backport it as this change needs to be backported, follow-up to #39795
> cherry-pick from #36092 in case we don't backport it as this change needs to be backported, follow-up to #39795

only on master. see https://github.com/pandas-dev/pandas/pull/39842#issuecomment-779915656 thanks @simonjayhawkins 