# ndarray-fft

> FFT for ndarrays

Latest version **1.0.3** (published 2016-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install ndarray-fft
pnpm add ndarray-fft
yarn add ndarray-fft
bun add ndarray-fft
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-08-11 |
| First published | 2013-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 50 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko, rreusser, planeshifter, jaspervdg, hughsk, substack |
| Keywords | ndarray, fft, fourier, transform, convolution, bluestein, radix, 2, image, volume, filter, signal |

## Links

- npm: https://www.npmjs.com/package/ndarray-fft
- Repository: https://github.com/mikolalysenko/ndarray-fft
- Homepage: https://github.com/mikolalysenko/ndarray-fft#readme
- Issues: https://github.com/mikolalysenko/ndarray-fft/issues
- npm.io page: https://npm.io/package/ndarray-fft

## Dependencies (5)

- [cwise](https://npm.io/package/cwise.md) ^1.0.4
- [ndarray](https://npm.io/package/ndarray.md) ^1.0.15
- [bit-twiddle](https://npm.io/package/bit-twiddle.md) ^1.0.2
- [ndarray-ops](https://npm.io/package/ndarray-ops.md) ^1.2.2
- [typedarray-pool](https://npm.io/package/typedarray-pool.md) ^1.0.0

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-08-11
- 1.0.2 — 2016-01-07
- 1.0.0 — 2014-09-27
- 0.1.0 — 2013-06-26
- 0.0.2 — 2013-05-16
- 0.0.1 — 2013-05-13
- 0.0.0 — 2013-05-12

## README

ndarray-fft
===========

[![Build Status](https://travis-ci.org/scijs/ndarray-fft.svg)](https://travis-ci.org/scijs/ndarray-fft)

> A fast Fourier transform implementation for [ndarrays](https://github.com/mikolalysenko/ndarray).  You can use this to do image processing operations on big, higher dimensional typed arrays in JavaScript.

## Example

```javascript
var zeros = require("zeros")
var ops = require("ndarray-ops")
var fft = require("ndarray-fft")

var x = ops.random(zeros([256, 256]))
  , y = ops.random(zeros([256, 256]))

//Forward transform x/y
fft(1, x, y)

//Invert transform
fft(-1, x, y)
```

## Install
Via npm:

    npm install ndarray-fft


### `require("ndarray-fft")(dir, x, y)`
Executes a fast Fourier transform on the complex valued array x/y.  

* `dir` - Either +/- 1.  Determines whether to use a forward or inverse FFT
* `x` the real part of the signal, encoded as an ndarray
* `y` the imaginary part of the signal, encoded as an ndarray

`x` and `y` are transformed in place.

**Note** This code is fastest when the components of the shapes arrays are all powers of two.  For non-power of two shapes, Bluestein's fft is used which is somewhat slower.

**Note2** The inverse FFT is scaled by 1/N, forward FFT is unnormalized.

# Credits
(c) 2013 Mikola Lysenko.  MIT License.

Radix 2 FFT based on code by Paul Bourke.

---
_Source: https://npm.io/package/ndarray-fft · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
