[yt-users] Unit error in enzo surface

Nathan Goldbaum nathan12343 at gmail.com
Thu May 4 07:14:45 PDT 2017


Hi Joe,

I can reproduce the error you're seeing. Thank you for the report. I've
filed an issue here:

https://github.com/yt-project/yt/issues/1368

The issue is that we're directly using a ufunc and yt's unit system does
not support direct ufunc operations on two arrays with different units
(even if they have the same dimensions). This means that you can't do
something like:

np.add(1*km, 1*cm)

However, it *is* ok to do:

1*km + 1*cm

This is a bug in yt because we should be accounting for that instead of
having a user trigger a traceback.

The issue should have a straightforward fix. You can subscribe to the issue
to get updates.

-Nathan

On Thu, May 4, 2017 at 9:07 AM, Joseph Tomlinson <jmtomlinson95 at gmail.com>
wrote:

> Hello all,
>
> I am running into an issue extracting the position data from a surface of
> some enzo data.
> It gives an error about adding code_unit to cm. A minimal script to
> generate the error can be seen here http://paste.yt-project.org/show/7136/
>
> I have previously had weird results with argmax returning code_units but
> labeling them as cm with another dataset, although this does not happen
> with the public dataset.
>
> Thanks,
> Joe Tomlinson
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170504/e250263a/attachment.htm>


More information about the yt-users mailing list