# ndarray-prefix-sum

> Computes a prefix sum of an ndarray

Latest version **1.0.0** (published 2015-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install ndarray-prefix-sum
pnpm add ndarray-prefix-sum
yarn add ndarray-prefix-sum
bun add ndarray-prefix-sum
```

## 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-04-24 |
| First published | 2013-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | prefix, sum, ndarray, summed, area, table, integral, image, volume, voxel, pixel, detection, convolution, box |

## Links

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

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-04-24
- 0.0.0 — 2013-11-04

## README

ndarray-prefix-sum
==================
Computes a [prefix sum](http://en.wikipedia.org/wiki/Prefix_sum) of an array, or in higher dimensions the [summed area table](http://en.wikipedia.org/wiki/Summed_area_table) of an image.  Works both in node.js and in the browser.  Built on top of [ndarray](https://github.com/mikolalysenko/ndarray).

## Example

```javascript
var ndarray = require("ndarray")
var prefixSum = require("ndarray-prefix-sum")

var x = ndarray(new Float32Array([1, 2, 3, 4, 5, 6]))

prefixSum(x)

for(var i=0; i<x.shape[0]; ++i) {
  console.log(x.get(i))
}
```

## Install

    npm install ndarray-prefix-sum

## API

### `require("ndarray-prefix-sum")(array)`
Computes the prefix sum of `array` in place.

* `array` is an ndarray

**Returns** `array`

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

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