[yt-svn] commit/yt: xarthisius: Ensure that width and center used during Camera initialization have common units. Fixes #1080,
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Sep 8 15:09:18 PDT 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/8cd86c7bb679/
Changeset: 8cd86c7bb679
Branch: yt
User: xarthisius
Date: 2015-09-05 03:50:42+00:00
Summary: Ensure that width and center used during Camera initialization have common units. Fixes #1080,
Affected #: 1 file
diff -r a7c319c1f87d4b749aa6feb737da504e43a7defb -r 8cd86c7bb679591ca26c8380f26657b7152a0654 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -177,6 +177,10 @@
width = self.ds.arr(width, input_units="code_length")
if not isinstance(center, YTArray):
center = self.ds.arr(center, input_units="code_length")
+ # Ensure that width and center are in the same units
+ # Cf. https://bitbucket.org/yt_analysis/yt/issue/1080
+ width.convert_to_units("code_length")
+ center.convert_to_units("code_length")
self.orienter = Orientation(normal_vector, north_vector=north_vector, steady_north=steady_north)
if not steady_north:
self.rotation_vector = self.orienter.unit_vectors[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