[yt-svn] commit/yt: ngoldbaum: Merged in ngoldbaum/yt (pull request #1811)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Oct 16 16:05:27 PDT 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/840ed4f67540/
Changeset: 840ed4f67540
Branch: yt
User: ngoldbaum
Date: 2015-10-16 23:05:16+00:00
Summary: Merged in ngoldbaum/yt (pull request #1811)
Ensure width is a 3 element array before using it like one
Affected #: 1 file
diff -r 51851891c0a89648cbf1b1d7fde3c320f50127fb -r 840ed4f675403c88edc6ec9c779599fd7dd3d699 yt/visualization/volume_rendering/off_axis_projection.py
--- a/yt/visualization/volume_rendering/off_axis_projection.py
+++ b/yt/visualization/volume_rendering/off_axis_projection.py
@@ -152,6 +152,8 @@
camera.set_width(width)
camera.switch_orientation(normal_vector=normal_vector,
north_vector=north_vector)
+ if not iterable(width):
+ width = data_source.ds.arr([width]*3)
camera.position = center - width[2]*camera.normal_vector
camera.focus = center
sc.camera = camera
@@ -174,9 +176,6 @@
east_vector = camera.unit_vectors[1]
normal_vector = camera.unit_vectors[2]
fields = vol.field
- if not iterable(width):
- width = data_source.ds.arr([width]*3)
-
mi = ds.domain_right_edge.copy()
ma = ds.domain_left_edge.copy()
for off1 in [-1, 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