[yt-dev] Issue #810: Unexpected units behavior creating yt sphere with unit_refactor (yt_analysis/yt)
Brian Crosby
issues-reply at bitbucket.org
Sun Mar 23 10:32:22 PDT 2014
New issue 810: Unexpected units behavior creating yt sphere with unit_refactor
https://bitbucket.org/yt_analysis/yt/issue/810/unexpected-units-behavior-creating-yt
Brian Crosby:
Creating a sphere object using a YTQuantity for the radius creates an object that appears to have the value of the radius in cm, despite calling it code_length.
Example:
In [4]: my_sphere = pf.sphere(location, YTQuantity(10, 'kpc'))
In [5]: my_sphere
Out[5]: YTSphere (moving7_0010): center=[ 0.75073242 0.75024414 0.75024414] code_length, radius=3.08567758096e+22 code_length
Creating the sphere with a tuple rather than a YTQuantity behaves normally.
Example:
In [6]: my_sphere = pf.sphere(location, (10, 'kpc'))
In [7]: my_sphere
Out[7]: YTSphere (moving7_0010): center=[ 0.75073242 0.75024414 0.75024414] code_length, radius=10.0 kpc
Responsible: ngoldbaum
More information about the yt-dev
mailing list