def test_consolidate(periodic=False, ndim=2):
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
size = comm.Get_size()
pts, le, re, ls = make_points(20, ndim, leafsize=3)
Tpara0 = cykdtree.PyParallelKDTree(pts, le, re, leafsize=ls,
periodic=periodic)
Tpara = Tpara0.consolidate()
if rank == 0:
if False:
from cykdtree.plot import plot2D_serial
plot2D_serial(Tpara, label_boxes=True,
plotfile='test_consolidate.png')
Tseri = cykdtree.PyKDTree(pts, le, re, leafsize=ls,
periodic=periodic)
Tpara.assert_equal(Tseri, strict_idx=False)
else:
assert(Tpara is None)
评论列表
文章目录