[yt-svn] commit/yt: MatthewTurk: Merged in ChrisMalone/yt (pull request #1260)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Oct 21 05:42:32 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/297789d10298/
Changeset:   297789d10298
Branch:      yt
User:        MatthewTurk
Date:        2014-10-21 12:42:19+00:00
Summary:     Merged in ChrisMalone/yt (pull request #1260)

center not needed in data_collection
Affected #:  2 files

diff -r 6f5a2e3f405f9ec96211c59085cc6101891ad655 -r 297789d102982dc0dd1b6926c7d93dfd60278b9d yt/data_objects/selection_data_containers.py
--- a/yt/data_objects/selection_data_containers.py
+++ b/yt/data_objects/selection_data_containers.py
@@ -542,7 +542,7 @@
     """
     _type_name = "data_collection"
     _con_args = ("_obj_list",)
-    def __init__(self, center, obj_list, ds = None, field_parameters = None):
+    def __init__(self, obj_list, ds=None, field_parameters=None, center=None):
         YTSelectionContainer3D.__init__(self, center, ds, field_parameters)
         self._obj_ids = np.array([o.id - o._id_offset for o in obj_list],
                                 dtype="int64")

diff -r 6f5a2e3f405f9ec96211c59085cc6101891ad655 -r 297789d102982dc0dd1b6926c7d93dfd60278b9d yt/data_objects/tests/test_data_collection.py
--- a/yt/data_objects/tests/test_data_collection.py
+++ b/yt/data_objects/tests/test_data_collection.py
@@ -8,7 +8,7 @@
     # We decompose in different ways
     for nprocs in [1, 2, 4, 8]:
         ds = fake_random_ds(16, nprocs = nprocs)
-        coll = ds.data_collection(ds.domain_center, ds.index.grids)
+        coll = ds.data_collection(ds.index.grids)
         crho = coll["density"].sum(dtype="float64").to_ndarray()
         grho = np.sum([g["density"].sum(dtype="float64") for g in ds.index.grids],
                       dtype="float64")
@@ -16,7 +16,7 @@
         yield assert_equal, coll.size, ds.domain_dimensions.prod()
         for gi in range(ds.index.num_grids):
             grids = ds.index.grids[:gi+1]
-            coll = ds.data_collection(ds.domain_center, grids)
+            coll = ds.data_collection(grids)
             crho = coll["density"].sum(dtype="float64")
             grho = np.sum([g["density"].sum(dtype="float64") for g in grids],
                           dtype="float64")

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