Hi All, Is there a way to drop the units for a value in yt 3.0? For example, in astropy, you can get the raw value of x (without units) by accessing x.value. Thanks, desika
Oh - I see this is also done the same way in yt.
Apologies for not trying this first.
-d
On Tue, Jul 29, 2014 at 11:51 AM, Desika Narayanan
Hi All,
Is there a way to drop the units for a value in yt 3.0? For example, in astropy, you can get the raw value of x (without units) by accessing x.value.
Thanks, desika
Yup, .d will get a view on the array without units. Note that modifications
to the original array will be reflected in this view.
Matt
On Jul 29, 2014 10:52 AM, "Desika Narayanan"
Hi All,
Is there a way to drop the units for a value in yt 3.0? For example, in astropy, you can get the raw value of x (without units) by accessing x.value.
Thanks, desika
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
See this doc page for more detail about converting to ndarray:
http://yt-project.org/docs/dev-3.0/analyzing/units/data_selection_and_fields...
On Tuesday, July 29, 2014, Matthew Turk
Yup, .d will get a view on the array without units. Note that modifications to the original array will be reflected in this view.
Matt On Jul 29, 2014 10:52 AM, "Desika Narayanan"
javascript:_e(%7B%7D,'cvml','dnarayan@haverford.edu');> wrote: Hi All,
Is there a way to drop the units for a value in yt 3.0? For example, in astropy, you can get the raw value of x (without units) by accessing x.value.
Thanks, desika
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org javascript:_e(%7B%7D,'cvml','yt-users@lists.spacepope.org'); http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Desika Narayanan
-
Matthew Turk
-
Nathan Goldbaum