You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/.../miniconda3/envs/scitools_dev/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2963, in run_codeexec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-42-60626d069686>", line 1, in <module>MEAN.lazy_aggregate(b, 0, weights=[2, 4, 1, 6, 3])
File "/.../git/iris/lib/iris/analysis/__init__.py", line 471, in lazy_aggregatereturnself.lazy_func(data, axis, **kwargs)
File "/.../git/iris/lib/iris/analysis/__init__.py", line 1460, in inner_stat
dask_result = dask_stats_function(array, axis=axis, **kwargs)
TypeError: mean() got an unexpected keyword argument 'weights'
This functionality is not tested by iris.tests.unit.analysis.test_MEAN.
One solution to this would be to use da.average rather than da.mean - but note there might be an implementational problem with da.average when the input array is masked.
The text was updated successfully, but these errors were encountered:
Despite being a weighted aggregator, you can't actually pass weights to
iris.analysis.MEAN
when producing a lazy aggregation:This functionality is not tested by
iris.tests.unit.analysis.test_MEAN
.One solution to this would be to use
da.average
rather thanda.mean
- but note there might be an implementational problem withda.average
when the input array is masked.The text was updated successfully, but these errors were encountered: