Commit bfa6b7ab authored by Marco Selig's avatar Marco Selig

minor corrections; documentation updated.

parent 18d2fafe
......@@ -9612,7 +9612,7 @@ class projection_operator(operator):
x : valid field
band : int, *optional*
Projection band whereon to project. (default: None)
bandsup: list of integers, *optional*
bandsup: {integer, list/array of integers}, *optional*
List of projection bands whereon to project and which to sum
up. The `band` keyword is prefered over `bandsup`.
(default: None)
......@@ -9631,8 +9631,11 @@ class projection_operator(operator):
return Px
elif(bandsup is not None):
bandsup = [int(bb) for bb in bandsup if -1<bb<self.bands()]
if(bandsup==[]):
if(np.isscalar(bandsup)):
bandsup = np.arange(int(bandsup),dtype=np.int)
else:
bandsup = np.array(bandsup,dtype=np.int)
if(np.any(bandsup>self.bands()-1))or(np.any(bandsup<0)):
raise ValueError(about._errors.cstring("ERROR: invalid input."))
Px = field(self.domain,val=None,target=x.target)
for bb in bandsup:
......
......@@ -41,7 +41,7 @@
"""
from __future__ import division
from scipy.interpolate import interp1d as ip ##
from scipy.interpolate import interp1d as ip ## conflicts with sphinx's autodoc
#import numpy as np
from nifty.nifty_core import *
import smoothing as gs
......
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