# ndarray-normalize

> Normalizes an ndarray to zero mean and unit variance

Latest version **1.0.0** (published 2015-06-02) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2015-06-02 |
| First published | 2013-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko, rreusser, planeshifter, jaspervdg, hughsk, substack |
| Keywords | normalize, ndarray, unit, mean, variance, image, volume |

## Links

- npm: https://www.npmjs.com/package/ndarray-normalize
- Repository: https://github.com/mikolalysenko/ndarray-normalize
- Issues: https://github.com/mikolalysenko/ndarray-normalize/issues
- npm.io page: https://npm.io/package/ndarray-normalize

## Dependencies (2)

- [cwise](https://npm.io/package/cwise.md) ^1.0.5
- [ndarray-moments](https://npm.io/package/ndarray-moments.md) ^1.0.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-06-02
- 0.1.0 — 2013-06-26
- 0.0.0 — 2013-05-15

## README

ndarray-normalize
=================
Normalizes an ndarray so that the mean is 0 and the standard deviation is 1.

## Example

```javascript
var moments = require("ndarray-moments")
var lena = require("luminance")(require("lena"))

console.log("Before normalization:", moments(2, lena))

require("ndarray-normalize")(lena)

console.log("After normalization:", moments(2, lena))
```

This prints out:

    Before normalization: [ 124.04670674515125, 17677.59913617722 ]
    After normalization: [ -7.130396703039932e-14, 1.0000000000002789 ]

## Install

    npm install ndarray-normalize

### `require("ndarray-normalize")(output, input)`
Normalizes an ndarray

* `output` gets the result
* `input` is the array that gets normalized (if unspecified, output is normalized in place)

**Returns** `output`

## Credits
(c) 2013 Mikola Lysenko. MIT License

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