🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ndarray-prefix-sum

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndarray-prefix-sum

Computes a prefix sum of an ndarray

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

ndarray-prefix-sum

Computes a prefix sum of an array, or in higher dimensions the summed area table of an image. Works both in node.js and in the browser. Built on top of ndarray.

Example

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

Keywords

prefix

FAQs

Package last updated on 24 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts