weigths
are always realized by the iris.analysis
module
#5338
Labels
weigths
are always realized by the iris.analysis
module
#5338
馃悰 Bug Report
How To Reproduce
Steps to reproduce the behaviour:
Recent versions of iris realize the weights arrays. It looks like the issue was introduced in #5084, so iris versions since 3.5 are affected.
Example:
Use
cube.collapsed(aggregator=iris.analysis.MEAN, weights=weights, coords=['latitude', 'longitude'])
wherecube
is aniris.cube.Cube
andweights
is adask.array.Array
. This will issue a warning likebecause the weights are realized in this code:
iris/lib/iris/analysis/__init__.py
Lines 1190 to 1291 in 1399994
Expected behaviour
The laziness of the weights array should be preserved. Because the weights array must be the same size as the data (on a side note: why does it need to be the same size? is this a limitation of numpy?), this makes it impossible to use this feature on large datasets.
Environment
The text was updated successfully, but these errors were encountered: