braindecode.functional.rotate_pairs#

braindecode.functional.rotate_pairs(x)[source]#

Rotate adjacent feature pairs from (a, b) to (-b, a).

Parameters:

x (Tensor) – Tensor of shape (..., features) with an even final dimension.

Returns:

Same shape, device and dtype as x. Frequencies, positional indexing and mixed-precision policy are left to the caller.

Return type:

Tensor