Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
D2O
Commits
39440e74
Commit
39440e74
authored
Oct 27, 2016
by
theos
Browse files
Fixed searchsorted.
parent
7a8916e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
d2o/distributor_factory.py
View file @
39440e74
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment