Issue #1161: YTArray does not return scalar item in correct dtype (yt_analysis/yt)
import yt mark = yt.YTArray([1,3,0]).astype('int') mark YTArray([1, 3, 0]) (dimensionless) mark.dtype
mark[0] 1.0 dimensionless mark[0].dtype
New issue 1161: YTArray does not return scalar item in correct dtype https://bitbucket.org/yt_analysis/yt/issues/1161/ytarray-does-not-return-sca... Yi-Hao Chen: The default dtype for YTArray is float64. If a YTArray is in integer or other dtype, it will still return an item in float64 if the returned item is a scalar. This can be clearly demonstrated in the following example. ``` #!python dtype('int64') dtype('float64') ``` This bug affects the function ```_find_field_values_at_points``` in ```GridIndex```. _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
participants (1)
-
Yi-Hao Chen