JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 910480
  • Score
    100M100P100Q184886F
  • License MIT

Normalize array (possibly n-dimensional) to zero mean and unit variance

Package Exports

  • array-normalize

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-normalize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

array-normalize experimental Build Status

Normalize array in-place to zero mean and unit variance.

npm install array-normalize

const normalize = require('array-normalize')

normalize([0, 50, 100]) // [0, .5, 1]

API

array = normalize(array, n=1)

Normalizes n-dimensional array in-place using dimensions n as stride, ie. for 1d array the expected data layout is [x, x, x, ...] for 2d is [x, y, x, y, ...], etc. Every dimension is normalized independently, so 2d array is normalized to unit square [0, 0, 1, 1].