[yt-svn] commit/yt: MatthewTurk: Adding an astype(float64) to weight field creation in off_axis_projection.

Bitbucket commits-noreply at bitbucket.org
Mon May 7 18:55:09 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/c1c90403232b/
changeset:   c1c90403232b
branch:      yt
user:        MatthewTurk
date:        2012-05-08 03:55:01
summary:     Adding an astype(float64) to weight field creation in off_axis_projection.
affected #:  1 file

diff -r 8d6d7639e079ff6eeb25e11b96b81a1b819b0cf6 -r c1c90403232b0636bf8473538d26e964427373fb yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -1292,7 +1292,7 @@
     if weight is not None:
         # This is a temporary field, which we will remove at the end.
         pf.field_info.add_field("temp_weightfield",
-            function=lambda a,b:b[field]*b[weight])
+            function=lambda a,b:b[field]*b[weight].astype("float64"))
         fields = ["temp_weightfield", weight]
         tf = ProjectionTransferFunction(n_fields = 2)
     tf = ProjectionTransferFunction(n_fields = len(fields))

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