From 995476ee317f3e435cb9030fea9b1adb4299bc4e Mon Sep 17 00:00:00 2001 From: Alex Fikl Date: Sat, 24 Mar 2018 15:57:02 -0500 Subject: [PATCH] tree_build: make sure srcntgts is an obj_array even if targets are not given. --- boxtree/tree_build.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/boxtree/tree_build.py b/boxtree/tree_build.py index fcbf1dc..29ba877 100644 --- a/boxtree/tree_build.py +++ b/boxtree/tree_build.py @@ -226,7 +226,13 @@ class TreeBuilder(object): # Targets weren't specified. Sources are also targets. Let's # call them "srcntgts". - srcntgts = particles + from pytools.obj_array import is_obj_array, make_obj_array + if is_obj_array(particles): + srcntgts = particles + else: + srcntgts = make_obj_array([ + p.with_queue(queue).copy() for p in particles + ]) assert source_radii is None assert target_radii is None -- GitLab