From 756cfddc4cc1ee1a12408fe06c9069e32d104c06 Mon Sep 17 00:00:00 2001 From: Serge Rey Date: Sat, 23 May 2020 08:21:18 -0700 Subject: [PATCH] DOC: correction for zonal.stats docstring --- xrspatial/zonal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xrspatial/zonal.py b/xrspatial/zonal.py index 535987ab..22f5426f 100644 --- a/xrspatial/zonal.py +++ b/xrspatial/zonal.py @@ -34,7 +34,7 @@ def stats(zones, values, stat_funcs=['mean', 'max', 'min', 'std', 'var']): The input value raster contains the input values used in calculating the output statistic for each zone. - stats: list of strings or dictionary. + stat_funcs: list of strings or dictionary. Which statistics to calculate for each zone. If a list, possible choices are subsets of ['mean', 'max', 'min', 'std', 'var'] @@ -66,7 +66,7 @@ def stats(zones, values, stat_funcs=['mean', 'max', 'min', 'std', 'var']): # custom stat >>> custom_stats ={'sum': lambda val: val.sum()} - >>> df = stats(zones, values) + >>> df = stats(zones, values, stat_funcs=custom_stats) >>> df sum 1 21.0