[Yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Fri Mar 4 11:00:58 PST 2011
2 new changesets in yt:
http://bitbucket.org/yt_analysis/yt/changeset/411825a4b111/
changeset: r3789:411825a4b111
branch: stable
user: sskory
date: 2011-03-04 01:41:42
summary: Fixing the import and reference of itertools in halo_objects.
affected #: 1 file (12 bytes)
--- a/yt/analysis_modules/halo_finding/halo_objects.py Fri Mar 04 11:58:40 2011 -0700
+++ b/yt/analysis_modules/halo_finding/halo_objects.py Thu Mar 03 17:41:42 2011 -0700
@@ -27,7 +27,7 @@
import gc
import h5py
-import itertools
+import itertools as it
import math
import numpy as na
import random
@@ -378,8 +378,8 @@
# Find the distances to the particles. I don't like this much, but I
# can't see a way to eliminate a loop like this, either here or in
# yt.math.
- for pos in izip(self["particle_position_x"], self["particle_position_y"],
- self["particle_position_z"]):
+ for pos in it.izip(self["particle_position_x"],
+ self["particle_position_y"], self["particle_position_z"]):
dist[mark] = periodic_dist(cen, pos, period)
mark += 1
# Set up the radial bins.
@@ -721,8 +721,8 @@
# Find the distances to the particles. I don't like this much, but I
# can't see a way to eliminate a loop like this, either here or in
# yt.math.
- for pos in izip(self["particle_position_x"], self["particle_position_y"],
- self["particle_position_z"]):
+ for pos in it.izip(self["particle_position_x"],
+ self["particle_position_y"], self["particle_position_z"]):
dist[mark] = periodic_dist(cen, pos, period)
mark += 1
dist_min, dist_max = min(dist), max(dist)
http://bitbucket.org/yt_analysis/yt/changeset/d6456ca4a26c/
changeset: r3790:d6456ca4a26c
branch: stable
user: sskory
date: 2011-03-04 01:46:09
summary: Errr. I decided that "import itertools at it" was too general as "it" is a word
in it's own right.
affected #: 1 file (8 bytes)
--- a/yt/analysis_modules/halo_finding/halo_objects.py Thu Mar 03 17:41:42 2011 -0700
+++ b/yt/analysis_modules/halo_finding/halo_objects.py Thu Mar 03 17:46:09 2011 -0700
@@ -27,7 +27,7 @@
import gc
import h5py
-import itertools as it
+import itertools
import math
import numpy as na
import random
@@ -378,7 +378,7 @@
# Find the distances to the particles. I don't like this much, but I
# can't see a way to eliminate a loop like this, either here or in
# yt.math.
- for pos in it.izip(self["particle_position_x"],
+ for pos in itertools.izip(self["particle_position_x"],
self["particle_position_y"], self["particle_position_z"]):
dist[mark] = periodic_dist(cen, pos, period)
mark += 1
@@ -721,7 +721,7 @@
# Find the distances to the particles. I don't like this much, but I
# can't see a way to eliminate a loop like this, either here or in
# yt.math.
- for pos in it.izip(self["particle_position_x"],
+ for pos in itertools.izip(self["particle_position_x"],
self["particle_position_y"], self["particle_position_z"]):
dist[mark] = periodic_dist(cen, pos, period)
mark += 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.
More information about the yt-svn
mailing list