@@ -75,6 +75,7 @@ def {method}(
75
75
See Also
76
76
--------
77
77
numpy.{method}
78
+ dask.array.{method}
78
79
{obj}.{method}
79
80
:ref:`{docref}`
80
81
User guide on {docref_description}.
@@ -108,7 +109,8 @@ def {method}(
108
109
109
110
_KWARGS_DOCSTRING = """**kwargs : dict
110
111
Additional keyword arguments passed on to the appropriate array
111
- function for calculating ``{method}`` on this object's data."""
112
+ function for calculating ``{method}`` on this object's data.
113
+ These could include dask-specific kwargs like ``split_every``."""
112
114
113
115
NAN_CUM_METHODS = ["cumsum" , "cumprod" ]
114
116
@@ -118,7 +120,7 @@ def {method}(
118
120
]
119
121
120
122
extra_kwarg = collections .namedtuple ("extra_kwarg" , "docs kwarg call example" )
121
- skip_na = extra_kwarg (
123
+ skipna = extra_kwarg (
122
124
docs = _SKIPNA_DOCSTRING ,
123
125
kwarg = "skipna: bool = None," ,
124
126
call = "skipna=skipna," ,
@@ -271,18 +273,18 @@ def generate_code(self, method):
271
273
)"""
272
274
273
275
274
- METHODS = (
276
+ REDUCTION_METHODS = (
275
277
Method ("count" ),
276
278
Method ("all" , bool_reduce = True ),
277
279
Method ("any" , bool_reduce = True ),
278
- Method ("max" , extra_kwargs = (skip_na ,)),
279
- Method ("min" , extra_kwargs = (skip_na ,)),
280
- Method ("mean" , extra_kwargs = (skip_na ,), numeric_only = True ),
281
- Method ("prod" , extra_kwargs = (skip_na , min_count ), numeric_only = True ),
282
- Method ("sum" , extra_kwargs = (skip_na , min_count ), numeric_only = True ),
283
- Method ("std" , extra_kwargs = (skip_na , ddof ), numeric_only = True ),
284
- Method ("var" , extra_kwargs = (skip_na , ddof ), numeric_only = True ),
285
- Method ("median" , extra_kwargs = (skip_na ,), numeric_only = True ),
280
+ Method ("max" , extra_kwargs = (skipna ,)),
281
+ Method ("min" , extra_kwargs = (skipna ,)),
282
+ Method ("mean" , extra_kwargs = (skipna ,), numeric_only = True ),
283
+ Method ("prod" , extra_kwargs = (skipna , min_count ), numeric_only = True ),
284
+ Method ("sum" , extra_kwargs = (skipna , min_count ), numeric_only = True ),
285
+ Method ("std" , extra_kwargs = (skipna , ddof ), numeric_only = True ),
286
+ Method ("var" , extra_kwargs = (skipna , ddof ), numeric_only = True ),
287
+ Method ("median" , extra_kwargs = (skipna ,), numeric_only = True ),
286
288
)
287
289
288
290
@@ -313,15 +315,15 @@ class DataStructure:
313
315
DatasetGenerator = ClassReductionGenerator (
314
316
cls = "" ,
315
317
datastructure = DatasetObject ,
316
- methods = METHODS ,
318
+ methods = REDUCTION_METHODS ,
317
319
docref = "agg" ,
318
320
docref_description = "reduction or aggregation operations" ,
319
321
example_call_preamble = "" ,
320
322
)
321
323
DataArrayGenerator = ClassReductionGenerator (
322
324
cls = "" ,
323
325
datastructure = DataArrayObject ,
324
- methods = METHODS ,
326
+ methods = REDUCTION_METHODS ,
325
327
docref = "agg" ,
326
328
docref_description = "reduction or aggregation operations" ,
327
329
example_call_preamble = "" ,
@@ -330,31 +332,31 @@ class DataStructure:
330
332
DataArrayGroupByGenerator = ClassReductionGenerator (
331
333
cls = "GroupBy" ,
332
334
datastructure = DataArrayObject ,
333
- methods = METHODS ,
335
+ methods = REDUCTION_METHODS ,
334
336
docref = "groupby" ,
335
337
docref_description = "groupby operations" ,
336
338
example_call_preamble = '.groupby("labels")' ,
337
339
)
338
340
DataArrayResampleGenerator = ClassReductionGenerator (
339
341
cls = "Resample" ,
340
342
datastructure = DataArrayObject ,
341
- methods = METHODS ,
343
+ methods = REDUCTION_METHODS ,
342
344
docref = "resampling" ,
343
345
docref_description = "resampling operations" ,
344
346
example_call_preamble = '.resample(time="3M")' ,
345
347
)
346
348
DatasetGroupByGenerator = ClassReductionGenerator (
347
349
cls = "GroupBy" ,
348
350
datastructure = DatasetObject ,
349
- methods = METHODS ,
351
+ methods = REDUCTION_METHODS ,
350
352
docref = "groupby" ,
351
353
docref_description = "groupby operations" ,
352
354
example_call_preamble = '.groupby("labels")' ,
353
355
)
354
356
DatasetResampleGenerator = ClassReductionGenerator (
355
357
cls = "Resample" ,
356
358
datastructure = DatasetObject ,
357
- methods = METHODS ,
359
+ methods = REDUCTION_METHODS ,
358
360
docref = "resampling" ,
359
361
docref_description = "resampling operations" ,
360
362
example_call_preamble = '.resample(time="3M")' ,
0 commit comments