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
Calling ds.r[:].mean([("gas", "density"), ("gas", "temperature")]) fails, claiming it can't identify the field [("gas", "density"), ("gas", "temperature")].
This is because it calls weight_field = sanitize_weight_field(self.ds, field, weight), which tries to regard field as a single field name.
A simple fix, which would only fix in the case of manually specifying the weight_field, would be to put the field_object assignment inside the conditional for if weight_field is None. A slightly better fix would be to have it check that the type is the same for all the specified fields, which would require some "ensure this is a list of field types" or something.
The text was updated successfully, but these errors were encountered:
oops, just merged #4904 and this one automatically closed. but since that PR only covered the simpler case when weight_field is not None, this issue should stay open, ya?
Calling
ds.r[:].mean([("gas", "density"), ("gas", "temperature")])
fails, claiming it can't identify the field[("gas", "density"), ("gas", "temperature")]
.This is because it calls
weight_field = sanitize_weight_field(self.ds, field, weight)
, which tries to regardfield
as a single field name.A simple fix, which would only fix in the case of manually specifying the
weight_field
, would be to put thefield_object
assignment inside the conditional for ifweight_field is None
. A slightly better fix would be to have it check that the type is the same for all the specified fields, which would require some "ensure this is a list of field types" or something.The text was updated successfully, but these errors were encountered: