- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature: Implementation of fourier transform #2540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Implementation of fourier transform #2540
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this looks good @HanchaiN , thanks a lot!
I made a few inline feedbacks, can you have a look at those?
Thanks for the updates @HanchaiN , looks good 👍 Two last remarks:
|
Thanks for the updates @HanchaiN. I see the two new TypeScript tests fail because the output is a matrix with a couple of complex values of which the imaginary part is 0 or -0, but the tests fails because the expected outcome are all real numbers. What would be the right outcome? |
Edit example in docs (`math.fft` returns complex matrix).
Edit example in docs (`math.ffti` returns complex matrix).
Edit docs examples, representation of complex number from `a+bi` to `{re:a, im:b}`
Edit docs examples, representation of complex number from `a+bi` to `{re:a, im:b}`
Edit test. Add test for `math.ifft` `math.fft` returns complex matrix.
Apologies for the long break before the update. The test failed when compare |
Ahh, good idea, you could try use |
Use `approx.deepEqual` instead off `assert.deepStrictEqual`.
Format code
It does not work either. But |
Use `assert.ok(math.deepEqual(...))` instead of `approx.deepEqual`.
Format
Typo: replace `approx` with `assert`.
Thanks for the updates @HanchaiN , I see you found a working solution with |
Fix #46