sympy.discrete.transforms.fwht (): can Walsh-Hadamard transform (WHT) . This method uses the order of the Hadamard sequence.
The sequence is automatically padded with zeros to the right, because the FXHT for radix-2 requires the number of sample points as a power of 2.
Parameters: - & gt; seq: [iterable] sequence on which WHT is to be applied. Returns: Fast Walsh Hadamard Transform Transform
Example # 1:
|
Output:
Transform: [646, -576, -488, 510]
Example # 2:
|
Output:
Transform: [93, -37, -21, 25]