<html><body>
<p>1 new commit in yt:</p>
<p><a href="http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BXcTD42YocdnOFkyGBVHOUgUfP6N6z0V5yyT-2F6jWYUN5wA8TkpYvOeGqIJvbOGL3o-3D_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27A7FIe1fAU5MYdMhryppkuDD7vuGwrKhxlD16FONRY41cyVIO7-2F8Wm7n6qoewzDO7yvvXjaPxg6pQ5wx5rPaFfQSGrY7JHG9CJlElWwppE1w86ILo9X4uMSZhpOkKfmdVG-2BuLVZkqZY21kzU25pX9-2F7c7iEhNcfS9Mso9FGPnw9GVdWKsw1wIdc3ChWcB50utc-3D">https://bitbucket.org/yt_analysis/yt/commits/ca40689574d6/</a> Changeset:   ca40689574d6 Branch:      yt User:        ngoldbaum Date:        2016-03-23 20:56:04+00:00 Summary:     Merged in xarthisius/yt (pull request #2066)</p>
<p>Ensure that mpi operations retain ImageArray type instead of downgrading to YTArray parent class Affected #:  1 file</p>
<p>diff -r 7d98d561e68cde5957a324cf1c6d6e3d92b43674 -r ca40689574d6bfcb2ec7155906597da1e247ae40 yt/utilities/parallel_tools/parallel_analysis_interface.py --- a/yt/utilities/parallel_tools/parallel_analysis_interface.py +++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py @@ -28,6 +28,7 @@</p>
<pre>    ensure_list, iterable

from yt.config import ytcfg</pre>
<p>+from yt.data_objects.image_array import ImageArray</p>
<pre>import yt.utilities.logger
from yt.utilities.lib.quad_tree import \
    QuadTree, merge_quadtrees</pre>
<p>@@ -794,15 +795,25 @@</p>
<pre>if self.comm.rank == root:
    if isinstance(data, YTArray):
        info = (data.shape, data.dtype, str(data.units), data.units.registry.lut)</pre>
<p>+                    if isinstance(data, ImageArray): +                        info += ('ImageArray',) +                    else: +                        info += ('YTArray',)</p>
<pre>    else:
        info = (data.shape, data.dtype)
else:
    info = ()
info = self.comm.bcast(info, root=root)
if self.comm.rank != root:</pre>
<ul><li><p>if len(info) == 4:</p></li></ul>
<p>+                if len(info) == 5:</p>
<pre>registry = UnitRegistry(lut=info[3], add_default_symbols=False)</pre>
<ul><li><p>data = YTArray(np.empty(info[0], dtype=info[1]), info[2], registry=registry)</p></li></ul>
<p>+                    if info[-1] == “ImageArray”: +                        data = ImageArray(np.empty(info[0], dtype=info[1]), +                                          input_units=info[2], +                                          registry=registry) +                    else: +                        data = YTArray(np.empty(info[0], dtype=info[1]), +                                       info[2], registry=registry)</p>
<pre>    else:
        data = np.empty(info[0], dtype=info[1])
mpi_type = get_mpi_type(info[1])</pre>
<p>@@ -1008,6 +1019,10 @@</p>
<pre>         # communicate type and shape and optionally units
         if isinstance(arr, YTArray):
unit_metadata = (str(arr.units), arr.units.registry.lut)</pre>
<p>+            if isinstance(arr, ImageArray): +                unit_metadata += ('ImageArray',) +            else: +                unit_metadata += ('YTArray',)</p>
<pre>         else:
unit_metadata = ()
         self.comm.send((arr.dtype.str, arr.shape) + unit_metadata, dest=dest, tag=tag)</pre>
<p>@@ -1020,9 +1035,13 @@</p>
<pre>         if ne is None and dt is None:
return self.comm.recv(source=source, tag=tag)
         arr = np.empty(ne, dtype=dt)</pre>
<ul><li><p>if len(metadata) == 4:</p></li></ul>
<p>+        if len(metadata) == 5:</p>
<pre>registry = UnitRegistry(lut=metadata[3], add_default_symbols=False)</pre>
<ul><li><p>arr = YTArray(arr, metadata[2], registry=registry)</p></li></ul>
<p>+            if metadata[-1] == “ImageArray”: +                arr = ImageArray(arr, input_units=metadata[2], +                                 registry=registry) +            else: +                arr = YTArray(arr, metadata[2], registry=registry)</p>
<pre>tmp = arr.view(self.__tocast)
self.comm.Recv([tmp, MPI.CHAR], source=source, tag=tag)
return arr</pre>
<p>@@ -1041,7 +1060,10 @@</p>
<pre>         if isinstance(send, YTArray):
# We assume send.units is consitent with the units
# on the receiving end.</pre>
<ul><li><p>recv = YTArray(recv, send.units)</p></li></ul>
<p>+            if isinstance(send, ImageArray): +                recv = ImageArray(recv, input_units=send.units) +            else: +                recv = YTArray(recv, send.units)</p>
<pre>recv[offset:offset+send.size] = send[:]
dtr = send.dtype.itemsize / tmp_send.dtype.itemsize # > 1
roff = [off * dtr for off in offsets]</pre>
<p>Repository URL: <a href="http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BI0v8SbQq-2B8-2FZaaHaJT85r_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27A7FIe1fAU5MYdMhryppkuDD7vuGwrKhxlD16FONRY41b9gfelp1AiwlFYVvHk92k89THT4GHJJ3o4UtHeAgIJuNeprdOeorqc1BiO1OlA2FT2Ua-2BefKJWt8R9xDbbLkdbL32TYFPDkGgXYAUoHwDm-2F-2Ft8KjNRKy0sckKYsV1Q5EL0LZWif9Ho4vlXTi2G2zIw-3D">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>

<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27A7FIe1fAU5MYdMhryppkuDD7vuGwrKhxlD16FONRY41Zq-2FB39jo4hfAN2FN5xhUIeOjFEMi1xcfn4ikJOh7yM2OuMRDdpiayNpszWTcbIBgfFrcjn9lY-2FEbhH-2BalTEF0xTR3bpdvCDKVOJCQ121tznkGPtZjbr5lT15VNT7d1CFgM08m8-2Fk79n1QMHv9jR9n8-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>