<html><body>
<p>1 new commit in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/8d076b60c7da/">https://bitbucket.org/yt_analysis/yt/commits/8d076b60c7da/</a> Changeset:   8d076b60c7da Branch:      yt User:        ngoldbaum Date:        2016-05-13 17:57:07+00:00 Summary:     Merged in MatthewTurk/yt (pull request #2170)</p>
<p>Override select for semistructured mesh.  Closes #1217 Affected #:  2 files</p>
<p>diff -r bdf16ce177f5fd1d88b07c227b0e5759fba0ecea -r 8d076b60c7dacde1de17041f79ff1a6bd0c3ea8e yt/data_objects/unstructured_mesh.py --- a/yt/data_objects/unstructured_mesh.py +++ b/yt/data_objects/unstructured_mesh.py @@ -225,3 +225,12 @@</p>
<pre>else:
    self._last_count = mask.sum()
         return mask</pre>
<p>+ +    def select(self, selector, source, dest, offset): +        mask = self._get_selector_mask(selector) +        count = self.count(selector) +        if count == 0: return 0 +        # Note: this likely will not work with vector fields. +        dest[offset:offset+count] = source.flat[mask] +        return count +</p>
<p>diff -r bdf16ce177f5fd1d88b07c227b0e5759fba0ecea -r 8d076b60c7dacde1de17041f79ff1a6bd0c3ea8e yt/frontends/stream/tests/test_stream_hexahedral.py --- a/yt/frontends/stream/tests/test_stream_hexahedral.py +++ b/yt/frontends/stream/tests/test_stream_hexahedral.py @@ -6,6 +6,7 @@</p>
<pre>from yt.testing import \
    assert_almost_equal, \
    assert_equal</pre>
<p>+from yt import SlicePlot</p>
<pre># Field information

def test_stream_hexahedral() :</pre>
<p>@@ -30,7 +31,7 @@</p>
<pre>    cell_z[0] = 0.0

    coords, conn = hexahedral_connectivity(cell_x, cell_y, cell_z)</pre>
<ul><li><p>data = {'random_field': np.random.random(Nx*Ny*Nz)}</p></li></ul>
<p>+    data = {'random_field': np.random.random((Nx, Ny, Nz))}</p>
<pre>bbox = np.array([ [0.0, 1.0], [0.0, 1.0], [0.0, 1.0] ])
ds = load_hexahedral_mesh(data, conn, coords, bbox=bbox)
dd = ds.all_data()</pre>
<p>@@ -42,7 +43,7 @@</p>
<pre>cell_y = np.linspace(0.0, 1.0, Ny+1)
cell_z = np.linspace(0.0, 1.0, Nz+1)
coords, conn = hexahedral_connectivity(cell_x, cell_y, cell_z)</pre>
<ul><li><p>data = {'random_field': np.random.random(Nx*Ny*Nz)}</p></li></ul>
<p>+    data = {'random_field': np.random.random((Nx, Ny, Nz))}</p>
<pre>bbox = np.array([ [0.0, 1.0], [0.0, 1.0], [0.0, 1.0] ])
ds = load_hexahedral_mesh(data, conn, coords, bbox=bbox)
dd = ds.all_data()</pre>
<p>@@ -51,3 +52,7 @@</p>
<pre>yield assert_almost_equal, dd["dx"].to_ndarray(), 1.0/Nx
yield assert_almost_equal, dd["dy"].to_ndarray(), 1.0/Ny
yield assert_almost_equal, dd["dz"].to_ndarray(), 1.0/Nz</pre>
<p>+ +    s = SlicePlot(ds, “x”, “random_field”) +    s._setup_plots() +    s.frb["random_field"]</p>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">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-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27D45Veclbsuy-2BBItNd3kwY7RY-2BM4RCHxmzCa-2FUg-2FGkd43s5aZy-2BMIq4ioDxXym9f1gcHyMeHno5hnHQoDh7-2FSbTPBBV6-2BxWXE8Qzc4QoGdYosmpFSBSjegq0ReiSzUziSjSoSNYQSkN2hS0DdEKNPaB66j3ig1KWdxbGlUsyRQeXJg8mYWHnfu6Ze7SD20uM70-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>