[yt-svn] commit/yt: MatthewTurk: Merged in brittonsmith/yt (pull request #2164)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed May 11 11:28:49 PDT 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/87f89bdc4c23/
Changeset: 87f89bdc4c23
Branch: yt
User: MatthewTurk
Date: 2016-05-11 18:28:35+00:00
Summary: Merged in brittonsmith/yt (pull request #2164)
[BUGFIX] Checking if returned field has units in volume-weighted smoothed fields.
Affected #: 1 file
diff -r 8b661ffb2b26c38a26c90e1c2854b9cb32bb9a34 -r 87f89bdc4c237e8319a35335c5f8875c517f63c8 yt/fields/particle_fields.py
--- a/yt/fields/particle_fields.py
+++ b/yt/fields/particle_fields.py
@@ -783,7 +783,8 @@
mass = data[ptype, mass_name].in_base(unit_system.name)
dens = data[ptype, density_name].in_base(unit_system.name)
quan = data[ptype, smoothed_field]
- quan = quan.convert_to_units(field_units)
+ if hasattr(quan, "units"):
+ quan = quan.convert_to_units(field_units)
if smoothing_length_name is None:
hsml = np.zeros(quan.shape, dtype='float64') - 1
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160511/400273b7/attachment.html>
More information about the yt-svn
mailing list