[yt-svn] commit/yt: MatthewTurk: Adding fixes for field datatypes in the geometry_utils
    Bitbucket 
    commits-noreply at bitbucket.org
       
    Mon Oct 15 18:04:29 PDT 2012
    
    
  
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/075253179b15/
changeset:   075253179b15
branch:      yt
user:        MatthewTurk
date:        2012-10-16 03:03:42
summary:     Adding fixes for field datatypes in the geometry_utils
affected #:  1 file
diff -r fbb264f8e6e827f47fc2f865908b4a5877d41816 -r 075253179b15993fbc59c1ee05c4fbe6dce1e615 yt/utilities/lib/geometry_utils.pyx
--- a/yt/utilities/lib/geometry_utils.pyx
+++ b/yt/utilities/lib/geometry_utils.pyx
@@ -360,9 +360,9 @@
     bv[0] = bulk_velocity[0]; bv[1] = bulk_velocity[1]; bv[2] = bulk_velocity[2]
     if len(data['x-velocity'].shape) == 1:
         # One dimensional data
-        vxf = data['x-velocity']
-        vyf = data['y-velocity']
-        vzf = data['z-velocity']
+        vxf = data['x-velocity'].astype("float64")
+        vyf = data['y-velocity'].astype("float64")
+        vzf = data['z-velocity'].astype("float64")
         rvf = np.empty((3, vxf.shape[0]), 'float64')
         for i in range(vxf.shape[0]):
             rvf[0, i] = vxf[i] - bv[0]
@@ -371,9 +371,9 @@
         return rvf
     else:
         # Three dimensional data
-        vxg = data['x']
-        vyg = data['y']
-        vzg = data['z']
+        vxg = data['x-velocity'].astype("float64")
+        vyg = data['y-velocity'].astype("float64")
+        vzg = data['z-velocity'].astype("float64")
         rvg = np.empty((3, vxg.shape[0], vxg.shape[1], vxg.shape[2]), 'float64')
         for i in range(vxg.shape[0]):
             for j in range(vxg.shape[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