Commit 10e11a0a authored by Ultima's avatar Ultima
Browse files

Test Suite coverage now at 88%.

-> Many bugfixes and refactorings.
parent d31b3ce6
......@@ -33,7 +33,7 @@
"""
from __future__ import division
from nifty import * # version 0.8.0
about.warnings.off()
about.warnings.on()
# some signal space; e.g., a two-dimensional regular grid
x_space = rg_space([1280, 1280], datamodel = 'd2o') # define signal space
......
......@@ -24,7 +24,7 @@ class _COMM_WORLD():
def Get_size(self):
return self.size
def _scattergather_helper(self, sendbuf, recvbuf=None):
def _scattergather_helper(self, sendbuf, recvbuf=None, **kwargs):
sendbuf = self._unwrapper(sendbuf)
recvbuf = self._unwrapper(recvbuf)
if recvbuf != None:
......@@ -68,13 +68,16 @@ class _COMM_WORLD():
return self._scattergather_helper(*args, **kwargs)
def Allreduce(self, sendbuf, recvbuf, op, **kwargs):
recvbuf[None] = op(sendbuf)
recvbuf[:] = op(sendbuf)
return recvbuf
def allreduce(self, sendbuf, recvbuf, op, **kwargs):
recvbuf[None] = op(sendbuf)
recvbuf[:] = op(sendbuf)
return recvbuf
def sendrecv(self, sendobj, **kwargs):
return sendobj
def _unwrapper(self, x):
if isinstance(x, list):
return x[0]
......
......@@ -1221,10 +1221,10 @@ class point_space(space):
"mean" : lambda y: getattr(y, 'mean')(),
"std" : lambda y: getattr(y, 'std')(),
"var" : lambda y: getattr(y, 'var')(),
"argmin" : lambda y: getattr(y, 'argmin')(),
"argmin_flat" : lambda y: getattr(y, 'argmin_flat')(),
"argmax" : lambda y: getattr(y, 'argmax')(),
"argmax_flat" : lambda y: getattr(y, 'argmax_flat')(),
"argmin" : lambda y: getattr(y, 'argmin_nonflat')(),
"argmin_flat" : lambda y: getattr(y, 'argmin')(),
"argmax" : lambda y: getattr(y, 'argmax_nonflat')(),
"argmax_flat" : lambda y: getattr(y, 'argmax')(),
"conjugate" : lambda y: getattr(y, 'conjugate')(),
"sum" : lambda y: getattr(y, 'sum')(),
"prod" : lambda y: getattr(y, 'prod')(),
......
This diff is collapsed.
This diff is collapsed.
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