[Yt-svn] commit/yt: sskory: Fixing the import and reference of itertools in halo_objects.

Bitbucket commits-noreply at bitbucket.org
Thu Mar 3 16:42:13 PST 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/aac656b6301c/
changeset:   r3785:aac656b6301c
branch:      yt
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	Thu Mar 03 18:42:25 2011 -0500
+++ 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
@@ -377,8 +377,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.
@@ -720,8 +720,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)

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