Commit b41e5ad8 authored by ultimanet's avatar ultimanet
Browse files

Fixed a bug in nifty_utilities.

parent c1dc4df8
......@@ -36,9 +36,9 @@ from __future__ import division
import matplotlib as mpl
mpl.use('Agg')
import gc
import imp
nifty = imp.load_module('nifty', None,
'/home/steininger/Downloads/nifty', ('','',5))
#import imp
#nifty = imp.load_module('nifty', None,
# '/home/steininger/Downloads/nifty', ('','',5))
from nifty import * # version 0.8.0
......@@ -46,7 +46,7 @@ if __name__ == "__main__":
about.warnings.off()
# some signal space; e.g., a two-dimensional regular grid
shape = [1024]
shape = [1024, 1024]
x_space = rg_space(shape)
#y_space = point_space(1280*1280)
#x_space = hp_space(32)
......
......@@ -132,7 +132,7 @@ COMPLEX = _datatype("MPI_COMPLEX")
DOUBLE_COMPLEX = _datatype("MPI_DOUBLE_COMPLEX")
class _comm_wrapper(object):
class _comm_wrapper(Intracomm):
def __init__(self, name):
self.cache = None
self.name = name
......@@ -150,4 +150,4 @@ class _comm_wrapper(object):
COMM_WORLD = _comm_wrapper('MPI_dummy_COMM_WORLD')
COMM_WORLD.__class__ = COMM_WORLD.comm.__class__
#COMM_WORLD.__class__ = COMM_WORLD.comm.__class__
......@@ -60,8 +60,11 @@ def _hermitianize_inverter(x):
for i in xrange(dimensions):
slice_picker = slice_primitive[:]
slice_picker[i] = slice(1, None, None)
slice_picker = tuple(slice_picker)
slice_inverter = slice_primitive[:]
slice_inverter[i] = slice(None, 0, -1)
slice_inverter = tuple(slice_inverter)
try:
y.set_data(to_key=slice_picker, data=y,
......
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