-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
kind/bugCategorizes issue related to bug.Categorizes issue related to bug.
Milestone
Description
It took me some time find out that you have to use a list and not a tuple for the weights
parameter. Can you update the code so that a tuple is accepted, or a better error message is printed?
An example below of what I got, with a slice of your clt.nc
test file
>>> cdutil.averager(clt, axis='xy', weights=['weighted','weighted'])
variable_140
masked_array(data=62.71149853,
mask=False,
fill_value=1e+20)
>>> cdutil.averager(clt, axis='yx', weights=('weighted','weighted'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/share/unix_files/cdat/miniconda3/envs/cdatm_py3/lib/python3.6/site-packages/genutil/averager.py", line 1264, in averager
filled_wtoptions = __check_weightoptions(V, axis, weights)
File "/home/share/unix_files/cdat/miniconda3/envs/cdatm_py3/lib/python3.6/site-packages/genutil/averager.py", line 486, in __check_weightoptions
'Error: Multiple axes passed without weights to match')
genutil.averager.AveragerError: ('E', 'r', 'r', 'o', 'r', ':', ' ', 'M', 'u', 'l', 't', 'i', 'p', 'l', 'e', ' ', 'a', 'x', 'e', 's', ' ', 'p', 'a', 's', 's', 'e', 'd', ' ', 'w', 'i', 't', 'h', 'o', 'u', 't', ' ', 'w', 'e', 'i', 'g', 'h', 't', 's', ' ', 't', 'o', ' ', 'm', 'a', 't', 'c', 'h')
>>>
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue related to bug.Categorizes issue related to bug.