Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-normalize

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-normalize

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

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
185K
increased by2.03%
Maintainers
1
Weekly downloads
 
Created
Source

array-normalize experimental Build Status

Normalize array to unit length, that is 0..1 range. See feature scaling.

npm install array-normalize

const normalize = require('array-normalize')

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

API

array = normalize(array, n=1, bounds?)

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]. Optionally pass bounds box if you know min/max values to optimize calculations.

Keywords

FAQs

Package last updated on 01 Jun 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc