def trimmean(arr, percent):
    lower_limit = scoreatpercentile(arr, percent / 2)
upper_limit = scoreatpercentile(arr, 100 - percent / 2)
return tmean(arr, limits=(lower_limit, upper_limit), inclusive=(False, False))
Trimmed Mean with Percentage Limit in Python?