[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Feb 13 09:22:28 PST 2018
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/82e1ea5218b2/
Changeset: 82e1ea5218b2
User: qobilidop
Date: 2018-02-10 22:29:06+00:00
Summary: Remove the redundant dtype conversion
Fixes #1691.
Affected #: 1 file
diff -r 5d623ec12aebc9d3815c6b3d59099c30f9db2d27 -r 82e1ea5218b2c6d7861ee17693ecdf20c724f45c yt/frontends/gadget/io.py
--- a/yt/frontends/gadget/io.py
+++ b/yt/frontends/gadget/io.py
@@ -323,7 +323,7 @@
if name in self._vector_fields:
factor = self._vector_fields[name]
arr = arr.reshape((count // factor, factor), order="C")
- return arr.astype(self._float_type)
+ return arr
def _get_morton_from_position(self, data_file, count, offset_count,
regions, DLE, DRE):
https://bitbucket.org/yt_analysis/yt/commits/ebb259918e10/
Changeset: ebb259918e10
User: qobilidop
Date: 2018-02-10 22:41:27+00:00
Summary: Test ParticleIDs uniqueness
Affected #: 1 file
diff -r 82e1ea5218b2c6d7861ee17693ecdf20c724f45c -r ebb259918e1076a4d516389d2b0c48e28ae8cb66 yt/frontends/gadget/tests/test_outputs.py
--- a/yt/frontends/gadget/tests/test_outputs.py
+++ b/yt/frontends/gadget/tests/test_outputs.py
@@ -76,3 +76,14 @@
for test in sph_answer(ds, 'snap_505', 2**17, iso_fields):
test_iso_collapse.__name__ = test.description
yield test
+
+
+ at requires_ds(LE_SnapFormat2)
+def test_pid_uniqueness():
+ """
+ ParticleIDs should be unique.
+ """
+ ds = data_dir_load(LE_SnapFormat2)
+ ad = ds.all_data()
+ pid = ad['ParticleIDs']
+ assert len(pid) == len(set(pid.v))
https://bitbucket.org/yt_analysis/yt/commits/de61f0694824/
Changeset: de61f0694824
User: ngoldbaum
Date: 2018-02-13 17:22:10+00:00
Summary: Merge pull request #1692 from qobilidop/fix-bin-pid
Fix the ParticleIDs issue for Gadget binary snapshots
Affected #: 2 files
diff -r add79730a0a8fb10fbb7f9c71b021faf1df9e8ea -r de61f06948242a40f5b06008d7f1a0cbe790875c yt/frontends/gadget/io.py
--- a/yt/frontends/gadget/io.py
+++ b/yt/frontends/gadget/io.py
@@ -323,7 +323,7 @@
if name in self._vector_fields:
factor = self._vector_fields[name]
arr = arr.reshape((count // factor, factor), order="C")
- return arr.astype(self._float_type)
+ return arr
def _get_morton_from_position(self, data_file, count, offset_count,
regions, DLE, DRE):
diff -r add79730a0a8fb10fbb7f9c71b021faf1df9e8ea -r de61f06948242a40f5b06008d7f1a0cbe790875c yt/frontends/gadget/tests/test_outputs.py
--- a/yt/frontends/gadget/tests/test_outputs.py
+++ b/yt/frontends/gadget/tests/test_outputs.py
@@ -76,3 +76,14 @@
for test in sph_answer(ds, 'snap_505', 2**17, iso_fields):
test_iso_collapse.__name__ = test.description
yield test
+
+
+ at requires_ds(LE_SnapFormat2)
+def test_pid_uniqueness():
+ """
+ ParticleIDs should be unique.
+ """
+ ds = data_dir_load(LE_SnapFormat2)
+ ad = ds.all_data()
+ pid = ad['ParticleIDs']
+ assert len(pid) == len(set(pid.v))
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list