[yt-svn] commit/yt: bwkeller: Merged in brittonsmith/yt (pull request #1887)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Nov 30 11:12:35 PST 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/0ba5b60db61c/
Changeset: 0ba5b60db61c
Branch: yt
User: bwkeller
Date: 2015-11-30 19:12:15+00:00
Summary: Merged in brittonsmith/yt (pull request #1887)
[bugfix] Only set output_units after units has been set.
Affected #: 1 file
diff -r 03a54b627189e63eaee9f2bc1d4a36c3ab6b9637 -r 0ba5b60db61ce63dfdd2c58ebaa4b14b19e16f03 yt/fields/derived_field.py
--- a/yt/fields/derived_field.py
+++ b/yt/fields/derived_field.py
@@ -88,8 +88,6 @@
self.display_field = display_field
self.particle_type = particle_type
self.vector_field = vector_field
- if output_units is None: output_units = units
- self.output_units = output_units
self._function = function
@@ -112,6 +110,9 @@
raise FieldUnitsError("Cannot handle units '%s' (type %s)." \
"Please provide a string or Unit " \
"object." % (units, type(units)) )
+ if output_units is None:
+ output_units = self.units
+ self.output_units = output_units
def _copy_def(self):
dd = {}
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.
More information about the yt-svn
mailing list