[yt-dev] Issue #1197: YTPositionArray doesn't work (yt_analysis/yt)

Matthew Turk issues-reply at bitbucket.org
Fri Mar 25 11:32:42 PDT 2016


New issue 1197: YTPositionArray doesn't work
https://bitbucket.org/yt_analysis/yt/issues/1197/ytpositionarray-doesnt-work

Matthew Turk:

I don't think this is explicitly the fault of `YTArray`, but I don't know how to get around it.  Right now, creating a `yt.data_objects.octree_subset.YTPositionArray` just returns `YTArray`.  I'm not sure how to make sure that it returns the right class, but I suspect something in the `YTArray` code doesn't pass down subclasses.  (It used to, I promise!)

Here's example code:

```
import yt
from yt.data_objects.octree_subset import YTPositionArray
ds = yt.load("enzo_tiny_cosmology/DD0043/DD0043")
pos = ds.r["particle_position"]
ppos = YTPositionArray(pos)
```

At this point, `ppos` should have `to_octree` as a method, but it doesn't.  Not sure how to fix this -- @ngoldbaum do you know how I could make sure that the subclass is correctly handled?

Responsible: MatthewTurk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20160325/22020fcc/attachment.htm>


More information about the yt-dev mailing list