[yt-svn] commit/yt-3.0: MatthewTurk: A fix for computing the mask of an octree. Fixes segfaults.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Oct 4 12:26:31 PDT 2013
1 new commit in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/c86499f6891e/
Changeset: c86499f6891e
Branch: yt-3.0
User: MatthewTurk
Date: 2013-10-04 21:26:12
Summary: A fix for computing the mask of an octree. Fixes segfaults.
Affected #: 1 file
diff -r 73a7cf95d67d589de7b672580bd98852a2f005e5 -r c86499f6891e4b191a4ac7cbcd44959ed0b9e245 yt/geometry/oct_container.pyx
--- a/yt/geometry/oct_container.pyx
+++ b/yt/geometry/oct_container.pyx
@@ -402,11 +402,11 @@
def mask(self, SelectorObject selector, np.int64_t num_cells = -1,
int domain_id = -1):
if num_cells == -1:
- num_cells = selector.count_oct_cells(self, domain_id)
+ num_cells = selector.count_octs(self, domain_id)
cdef np.ndarray[np.uint8_t, ndim=1] coords
cdef OctVisitorData data
self.setup_data(&data, domain_id)
- coords = np.zeros((num_cells), dtype="uint8")
+ coords = np.zeros((num_cells*8), dtype="uint8")
data.array = <void *> coords.data
self.visit_all_octs(selector, oct_visitors.mask_octs, &data)
return coords.astype("bool")
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
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