From 4396d61cb5376e33e1c4e909500d1973f7077485 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 24 Feb 2018 17:42:01 -0600 Subject: [PATCH] Allow geometry features finer than machine epsilon (#23 on Gitlab) --- boxtree/tree_build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/boxtree/tree_build.py b/boxtree/tree_build.py index b03c336..fcbf1dc 100644 --- a/boxtree/tree_build.py +++ b/boxtree/tree_build.py @@ -458,7 +458,9 @@ class TreeBuilder(object): queue, box_parent_ids.data, np.zeros((), dtype=box_parent_ids.dtype)) prep_events.append(evt) - nlevels_max = np.finfo(coord_dtype).nmant + 1 # num bits in the significand + # 2*(num bits in the significand) + # https://gitlab.tiker.net/inducer/boxtree/issues/23 + nlevels_max = 2*(np.finfo(coord_dtype).nmant + 1) assert nlevels_max <= np.iinfo(self.box_level_dtype).max # level -> starting box on level -- GitLab