# ml-array-normed

> Normalize the values of a given array

Latest version **2.0.0** (published 2026-04-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install ml-array-normed
pnpm add ml-array-normed
yarn add ml-array-normed
bun add ml-array-normed
```

## Health

**Score 50/100 (C)** — status: active.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-04-14 |
| First published | 2018-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 3 |
| Unpacked size | 13.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Luc Patiny |
| Maintainers | stropitek, targos, lpatiny, mljs-bot, cheminfo-bot |

## Links

- npm: https://www.npmjs.com/package/ml-array-normed
- Repository: https://github.com/mljs/array
- Homepage: https://github.com/mljs/array/tree/master/packages/array-mean#readme
- Issues: https://github.com/mljs/array/issues
- npm.io page: https://npm.io/package/ml-array-normed

## Dependencies (3)

- [is-any-array](https://npm.io/package/is-any-array.md) ^3.0.0
- [ml-array-max](https://npm.io/package/ml-array-max.md) ^2.0.0
- [ml-array-sum](https://npm.io/package/ml-array-sum.md) ^2.0.0

## Recent versions

- 2.0.0 (latest) — 2026-04-14
- 1.3.7 — 2022-01-21
- 1.3.6 — 2021-03-24
- 1.3.5 — 2021-03-03
- 1.3.4 — 2021-02-23
- 1.3.3 — 2021-02-17
- 1.3.2 — 2020-10-07
- 1.3.1 — 2020-04-17
- 1.3.0 — 2020-04-17
- 1.2.0 — 2020-04-02
- 1.1.0 — 2020-03-02
- 1.0.3 — 2019-08-30
- 1.0.2 — 2018-11-09
- 1.0.1 — 2018-10-01

## README

# array-normed

[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]

Norme the vector (sum to 1 by default)

## Installation

`$ npm install --save ml-array-normed`

## Usage

```js
import normed from 'ml-array-normed';

const result = normed([1, 2, 3, 4]);
// [0.1, 0.2, 0.3, 0.4]
```

```js
import normed from 'ml-array-normed';

const result = normed([1, 2, 3, 4], { algorithm: 'max' });
// [0.25, 0.5, 0.75, 1]
```

```js
import normed from 'ml-array-normed';

const result = normed([1, 2, 3, 4], { algorithm: 'max', maxValue: 100 });
// [25, 50, 75, 100]
```

## License

[MIT](./LICENSE)

[npm-image]: https://img.shields.io/npm/v/ml-array-normed.svg?style=flat-square
[npm-url]: https://npmjs.org/package/ml-array-normed
[download-image]: https://img.shields.io/npm/dm/ml-array-normed.svg?style=flat-square
[download-url]: https://npmjs.org/package/ml-array-normed

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