A Gale–Berlekamp permutation-switching problem in higher dimensions. (March 2019)