Title: Fast Fourier Transform Javascript
Tags: javascript;python;fft
Question: I need a FFT function like the FFT in numpy (python) that takes only ONE list( length doesnt necessarily need to be power of 2).
I used dsp.js but it needs the Buffer size and buffer size must be power of 2 but my data length is 500.
is there any library that isnt audio exclusive ?
or should I add 0 to end of array ?
Comment: A small amount of zero padding is often a good and fast option, even when the library does support arbitrary sizes. That said, google turns up a number of hits for FFT javascript libraries, including [this blog](https://thebreakfastpost.com/2015/10/18/ffts-in-javascript/)

Here is the accepted answer: You absolutely can pad with zeros to reach the desired size.  See this reference: http://www.bitweenie.com/listings/fft-zero-padding/
A quote straight from the article:
There are a few reasons why you might want to zero pad time-domain data. The most common reason is to make a waveform have a power-of-two number of samples. When the time-domain length of a waveform is a power of two, radix-2 FFT algorithms, which are extremely efficient, can be used to speed up processing time. FFT algorithms made for FPGAs also typically only work on lengths of power two.

Here is another answer: In addition to the options presented in the blog post suggested by SleuthEye, there is another Discrete Fourier Transform, which happens to be written in JavaScript. The output format may be different than what you'd get from other programs (e.g., MATLAB, MathCAD, etc.), but it is easy enough to edit by copying into, say, an Excel spreadsheet and re-formatting or scaling the results into the format you want.
And, as you'd like, this program does not require the number of inputs to be a power of 2.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:07/11/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<javascript><python><fft>', 'Title': 'Fast Fourier Transform Javascript', 'ViewCount': 1979, 'id': 38316538, 'user_AboutMe': None, 'user_AccountId': None, 'user_DisplayName': None, 'user_Reputation': None, 'user_Views': None, 'user_id': None}}