Commit 8d2916d7 authored by Theo Steininger's avatar Theo Steininger

RGSpace now forbids zerocentered axes with odd length.

parent 1cb7af7a
Pipeline #16545 failed with stages
in 5 minutes and 16 seconds
...@@ -330,6 +330,8 @@ class RGSpace(Space): ...@@ -330,6 +330,8 @@ class RGSpace(Space):
def _parse_zerocenter(self, zerocenter): def _parse_zerocenter(self, zerocenter):
temp = np.empty(len(self.shape), dtype=bool) temp = np.empty(len(self.shape), dtype=bool)
temp[:] = zerocenter temp[:] = zerocenter
if np.any(np.logical_and(temp, np.array(self.shape) % 2)):
raise ValueError("All zerocentered axis must have even length!")
return tuple(temp) return tuple(temp)
# ---Serialization--- # ---Serialization---
......
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