output rel_shift if assertion false

This commit is contained in:
Michael Krayer 2021-06-03 12:48:43 +02:00
parent 83bfca08f9
commit d256d4ec2c
1 changed files with 1 additions and 1 deletions

View File

@ -371,7 +371,7 @@ class Field3d:
assert isinstance(rel_shift,(tuple,list,numpy.ndarray)) and len(rel_shift)==3,\
"'shift' must be tuple/list with length 3."
assert all([rel_shift[ii]>=-1.0 and rel_shift[ii]<=1.0 for ii in range(3)]),\
"'shift' must be in (-1.0,1.0)."
"'shift' must be in (-1.0,1.0). {}".format(rel_shift)
data = self.data.copy()
origin = list(self.origin)
sl = 3*[slice(None)]