Update default value of weights
kwarg in spatial_avg()
#147
Labels
type: enhancement
New enhancement request
weights
kwarg in spatial_avg()
#147
Is your feature request related to a problem? If yes, Please describe
Related issue: xCDAT/xcdat-validation#23 (comment)
weights
defaults toNone
, which can confuse the user and make it seem like weights aren't automatically generated.It should be set to
weights="generated"
, which performs the same behavior as if it wereNone
.Also, does it make sense to handle a
np.array
of weights inspatial_avg()
? Currently, it requires custom weights to be aDataArray
with the same spatial axis dimensions and sizes as the data variableDataArray
. If we want to acceptnp.array
we'd have to implement a method that creates the weightsDataArray
from this array so that it can be correctly applied to the data variable (still have to think more about the implementation if it makes sense or is possible).Describe your proposed solution
Describe alternatives solutions you've considered
Additional context
The text was updated successfully, but these errors were encountered: