[SciPy-Dev] Fast Walsh–Hadamard transform for SciPy ?

Neal Becker ndbecker2 at gmail.com
Sat Mar 24 10:19:13 EDT 2018


I see I have made use of complex walsh-hadamard in the past, here's another
code snippet that shows construction of real and complex matrixes:

def walsh (n, dtype=int):
    w2 = np.array (((1, 1), (1, -1)), dtype=dtype)
    if n == 0:
        return np.array (((1,),))
    elif (n == 1):
        return w2
    else:
        m2 = walsh (n-1);
        return np.kron (w2, m2)

def cwalsh (n):
    if n == 0:
        return np.array (((1,),))
    c2 = np.array (((1, 1j), (1j, 1)))
    if (n == 1):
        return c2
    else:
        m2 = walsh (n-1);
        return np.ascontiguousarray (np.kron (c2, m2))

The code I posted earlier has implementation of fast complex transform (as
well as fast real transform)


On Sat, Mar 24, 2018 at 2:06 AM Ralf Gommers <ralf.gommers at gmail.com> wrote:

> On Thu, Mar 22, 2018 at 11:51 AM, Chaman Agrawal <chaman.ag at gmail.com>
> wrote:
>
>> Issue #8590 https://github.com/scipy/scipy/issues/8590
>>
>> Currently there is no implementation of Fast Walsh–Hadamard transform in
>> SciPy. Although it seems that FWHT is not as general as FFT but it is
>> pretty ubiquitous ,it is there is other maths and science softwares like
>> MATLAB etc. .I would like to contribute towards it. Following are the
>> details about it.
>>
> There seems to be enough interest and wide enough applicability, I'd be in
> favour of merging a good implementation in scipy.fftpack.
>
> Ralf
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180324/75add847/attachment.html>


More information about the SciPy-Dev mailing list