Equivalent mathematica implementation of Fourier transform relevant functions in sympy.

151 views
Skip to first unread message

hongy...@gmail.com

unread,
May 22, 2021, 7:56:44 AM5/22/21
to sympy
Wolfram Mathematica has so many Fourier transform relevant functions, say, FourierDST, FourierDCT, and so on. I'm currently learning the notes written by Dr. Roman Schmied <https://arxiv.org/e-print/1403.7050>, where all examples are encoded in Mathematica, but I want to find the python based implementation. 

The biggest barrier to converting the Mathematica codes into its counterpart in python, say, with sympy, is the corresponding realization of various advanced complex functions in both.

Any hints for this problem will be highly appreciated.

Regards,
HY


Davide Sandona'

unread,
May 22, 2021, 8:39:26 AM5/22/21
to sy...@googlegroups.com
Hello,

I'm not really sure if those functions are implemented into SymPy yet. You should check out the documentation: search for example "discrete transform" or "Fourier transform".

In Mathematica, symbolic and numeric computations go hand in hand. The Python ecosystem is very different in that regard. As you surely know there are many libraries, each one targeting a specific topic and sometimes one library is unaware of the others. For example, SymPy is about symbolic computation, Numpy is about numeric array/matrices computations, Scipy offers a great number of tools useful for engineering and scientific computation, and so on... Is it possible that SymPy is not the right library to achieve your goals? If you are able to formulate your problem in a numerical way (instead of a symbolic approach), you could look at the following Scipy documentation page: https://docs.scipy.org/doc/scipy/reference/fft.html

Davide.


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/65b57e9c-44a0-458e-8ce7-36b0f23236d2n%40googlegroups.com.

hongy...@gmail.com

unread,
May 22, 2021, 9:11:20 AM5/22/21
to sympy
On Saturday, May 22, 2021 at 8:39:26 PM UTC+8 sandona...@gmail.com wrote:
Hello,

I'm not really sure if those functions are implemented into SymPy yet. You should check out the documentation: search for example "discrete transform" or "Fourier transform".

In Mathematica, symbolic and numeric computations go hand in hand. The Python ecosystem is very different in that regard. As you surely know there are many libraries, each one targeting a specific topic and sometimes one library is unaware of the others. For example, SymPy is about symbolic computation, Numpy is about numeric array/matrices computations, Scipy offers a great number of tools useful for engineering and scientific computation, and so on... Is it possible that SymPy is not the right library to achieve your goals? If you are able to formulate your problem in a numerical way (instead of a symbolic approach), you could look at the following Scipy documentation page: https://docs.scipy.org/doc/scipy/reference/fft.html

Thank you very much. It does include so many Fourier transformations, especially, the ones I mentioned are list here: <https://docs.scipy.org/doc/scipy/reference/fft.html#discrete-sin-and-cosine-transforms-dst-and-dct>.

HY

S.Y. Lee

unread,
May 24, 2021, 3:54:39 AM5/24/21
to sympy
I don't think that we have algorithms for discrete sin, cosine transforms.
You would have to come up with any ideas of implementing fast transformation algorithms for symbolic computation,
but I would defer them for now unless I have idea about how to do that by some efficient algebraic computation.
Reply all
Reply to author
Forward
0 new messages