[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Dec 3 10:03:01 PST 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/f531c0605c56/
Changeset:   f531c0605c56
Branch:      yt
User:        hegan
Date:        2014-12-03 01:08:32+00:00
Summary:     Making datasets with 0 active particles functional by removing particle from particle type list
Affected #:  1 file

diff -r 56fb0a5ad8d5bd9752cf2701324e357ec5490086 -r f531c0605c56d13f24c7db3758558d68c813db01 yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -406,6 +406,10 @@
         for ptype in self.dataset["AppendActiveParticleType"]:
             select_grids = self.grid_active_particle_count[ptype].flat
             if np.any(select_grids) == False:
+                current_ptypes = self.dataset.particle_types
+                new_ptypes = [p for p in current_ptypes if p != ptype]
+                self.dataset.particle_types = new_ptypes
+                self.dataset.particle_types_raw = new_ptypes
                 continue
             gs = self.grids[select_grids > 0]
             g = gs[0]


https://bitbucket.org/yt_analysis/yt/commits/9d96ac2cfc30/
Changeset:   9d96ac2cfc30
Branch:      yt
User:        brittonsmith
Date:        2014-12-03 18:02:49+00:00
Summary:     Merged in hegan/yt (pull request #1329)

[bugfix] Making datasets with 0 active particles functional by removing particle from particle type list
Affected #:  1 file

diff -r ee4276f9be712f57aa6dc829d7990fe6f8511f83 -r 9d96ac2cfc308468239e99e88552a704168291e0 yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -406,6 +406,10 @@
         for ptype in self.dataset["AppendActiveParticleType"]:
             select_grids = self.grid_active_particle_count[ptype].flat
             if np.any(select_grids) == False:
+                current_ptypes = self.dataset.particle_types
+                new_ptypes = [p for p in current_ptypes if p != ptype]
+                self.dataset.particle_types = new_ptypes
+                self.dataset.particle_types_raw = new_ptypes
                 continue
             gs = self.grids[select_grids > 0]
             g = gs[0]

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