[yt-svn] commit/yt-3.0: MatthewTurk: For deposition fields (in *any* frontend) that do not supply a fields argument,
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Sep 6 15:03:46 PDT 2013
1 new commit in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/a5b7d8a34375/
Changeset: a5b7d8a34375
Branch: yt-3.0
User: MatthewTurk
Date: 2013-09-06 23:28:33
Summary: For deposition fields (in *any* frontend) that do not supply a fields argument,
we default to an empty list. This fixes the three places the deposit() makes
an appearance.
Closes #654.
Affected #: 2 files
diff -r 0a57d1a9fb4c3f0c7c8bf93d277f33f81c7c3e98 -r a5b7d8a34375cddfe6337614947dd3f605adecf0 yt/data_objects/octree_subset.py
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -127,6 +127,7 @@
def deposit(self, positions, fields = None, method = None):
# Here we perform our particle deposition.
+ if fields is None: fields = []
cls = getattr(particle_deposit, "deposit_%s" % method, None)
if cls is None:
raise YTParticleDepositionNotImplemented(method)
@@ -148,6 +149,7 @@
def smooth(self, positions, fields = None, method = None):
# Here we perform our particle deposition.
+ if fields is None: fields = []
cls = getattr(particle_smooth, "%s_smooth" % method, None)
if cls is None:
raise YTParticleDepositionNotImplemented(method)
diff -r 0a57d1a9fb4c3f0c7c8bf93d277f33f81c7c3e98 -r a5b7d8a34375cddfe6337614947dd3f605adecf0 yt/frontends/artio/data_structures.py
--- a/yt/frontends/artio/data_structures.py
+++ b/yt/frontends/artio/data_structures.py
@@ -166,6 +166,7 @@
def deposit(self, positions, fields = None, method = None):
# Here we perform our particle deposition.
+ if fields is None: fields = []
cls = getattr(particle_deposit, "deposit_%s" % method, None)
if cls is None:
raise YTParticleDepositionNotImplemented(method)
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
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