Commit 55e5d0e8 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

adjust FieldZeroPadder as well

parent 22fa09fb
......@@ -36,15 +36,13 @@ class FieldZeroPadder(LinearOperator):
dom = self._domain[self._space]
if not isinstance(dom, RGSpace):
raise TypeError("RGSpace required")
if dom.harmonic:
raise TypeError("RGSpace must not be harmonic")
if len(new_shape) != len(dom.shape):
raise ValueError("Shape mismatch")
if any([a < b for a, b in zip(new_shape, dom.shape)]):
raise ValueError("New shape must not be smaller than old shape")
self._target = list(self._domain)
self._target[self._space] = RGSpace(new_shape, dom.distances)
self._target[self._space] = RGSpace(new_shape, dom.distances,
self._target = DomainTuple.make(self._target)
self._capability = self.TIMES | self.ADJOINT_TIMES
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