From 3dc5f18e1649c13b0a8855936047487d715a9e46 Mon Sep 17 00:00:00 2001 From: ashkelly Date: Fri, 12 Jun 2020 15:43:11 +0100 Subject: [PATCH 1/2] added domain_override check to the all_data_check --- yt/geometry/selection_routines.pyx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yt/geometry/selection_routines.pyx b/yt/geometry/selection_routines.pyx index f4ba17b2365..296e239ba09 100644 --- a/yt/geometry/selection_routines.pyx +++ b/yt/geometry/selection_routines.pyx @@ -951,7 +951,9 @@ cdef class RegionSelector(SelectorObject): cdef np.float64_t[:] DRE = _ensure_code(dobj.ds.domain_right_edge) le_all = (np.array(LE) == _ensure_code(dobj.ds.domain_left_edge)).all() re_all = (np.array(RE) == _ensure_code(dobj.ds.domain_right_edge)).all() - if le_all and re_all: + # If we have a bounding box, then we should *not* revert to all data + domain_override = getattr(dobj.ds, '_domain_override', False) + if le_all and re_all and not dobj.ds._domain_override: self.is_all_data = True else: self.is_all_data = False From 5f12c138402bae2803fe5e70d76adfc7ab19ed79 Mon Sep 17 00:00:00 2001 From: ashkelly Date: Fri, 12 Jun 2020 16:48:22 +0100 Subject: [PATCH 2/2] fixed bad access --- yt/geometry/selection_routines.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt/geometry/selection_routines.pyx b/yt/geometry/selection_routines.pyx index 296e239ba09..11fe7a425f4 100644 --- a/yt/geometry/selection_routines.pyx +++ b/yt/geometry/selection_routines.pyx @@ -953,7 +953,7 @@ cdef class RegionSelector(SelectorObject): re_all = (np.array(RE) == _ensure_code(dobj.ds.domain_right_edge)).all() # If we have a bounding box, then we should *not* revert to all data domain_override = getattr(dobj.ds, '_domain_override', False) - if le_all and re_all and not dobj.ds._domain_override: + if le_all and re_all and not domain_override: self.is_all_data = True else: self.is_all_data = False