DOC: fix for val2array.
ENH: _setWithOperation now handles power and modulus.
And made it a bit nicer to read.