Commit 39440e74 authored by theos's avatar theos

Fixed searchsorted.

parent 7a8916e0
......@@ -1718,16 +1718,16 @@ class _slicing_distributor(distributor):
local_searched = np.searchsorted(a=a, v=v, side=side)
global_searched = np.empty_like(local_searched)
if side is 'left':
op = MPI.MAX
elif side is 'right':
op = MPI.MIN
else:
raise ValueError
# if side is 'left':
# op = MPI.MAX
# elif side is 'right':
# op = MPI.MIN
# else:
# raise ValueError
self.comm.Allreduce([local_searched, MPI.INT],
[global_searched, MPI.INT],
op=op)
op=MPI.SUM)
if global_searched.shape == ():
global_searched = global_searched[()]
return global_searched
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment