Skip to content

Commit

Permalink
Merge pull request #3962 from neutrinoceros/hotfix_reg_3959
Browse files Browse the repository at this point in the history
BUG: fix automated field unit detection for profiles
matthewturk authored Jun 13, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents c7c2185 + 49579a8 commit 8b8b42b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yt/data_objects/selection_objects/data_selection_objects.py
Original file line number Diff line number Diff line change
@@ -262,6 +262,8 @@ def _generate_fields(self, fields_to_generate):
fi.units = sunits
fi.dimensions = dimensions
self.field_data[field] = self.ds.arr(fd, units)
if fi.output_units is None:
fi.output_units = fi.units

try:
fd.convert_to_units(fi.units)

0 comments on commit 8b8b42b

Please sign in to comment.