[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed May 11 11:28:53 PDT 2016
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/b669562c5450/
Changeset: b669562c5450
Branch: yt
User: brittonsmith
Date: 2016-05-09 16:59:48+00:00
Summary: Checking if returned field has units in volume-weighted smoothed fields.
Affected #: 1 file
diff -r 7f7ccbc9329e14578e120835c0365f2e271e72cf -r b669562c54509c4ecd558c38feece18b395d7a58 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
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/cecf6283/attachment-0002.htm>
More information about the yt-svn
mailing list