array-normalize

WebJar for array-normalize

License

License

MIT
Categories

Categories

ORM Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

array-normalize
Last Version

Last Version

1.1.4
Release Date

Release Date

Type

Type

jar
Description

Description

array-normalize
WebJar for array-normalize
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/dy/array-normalize

Download array-normalize

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/array-normalize/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>array-normalize</artifactId>
    <version>1.1.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/array-normalize/
implementation 'org.webjars.npm:array-normalize:1.1.4'
// https://jarcasting.com/artifacts/org.webjars.npm/array-normalize/
implementation ("org.webjars.npm:array-normalize:1.1.4")
'org.webjars.npm:array-normalize:jar:1.1.4'
<dependency org="org.webjars.npm" name="array-normalize" rev="1.1.4">
  <artifact name="array-normalize" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='array-normalize', version='1.1.4')
)
libraryDependencies += "org.webjars.npm" % "array-normalize" % "1.1.4"
[org.webjars.npm/array-normalize "1.1.4"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : array-bounds jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

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]
normalize([0, 0, .1, .2, 1, 2], 2) // [0, 0, .1, .1, 1, 1]
normalize([0, .25, 1, .25], 2, [0, .5, 1, .5]) // [0, .5, 1, .5])

API

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

Normalizes n-dimensional array in-place using optional stride for n-dimensions, ie. for 2d data layout is [x, y, x, y, ...].

Every dimension is normalized independently, eg. 2d array is normalized to unit square [0, 0, 1, 1].

Optional bounds box can predefine min/max to skip bounds detection.

Versions

Version
1.1.4
1.1.3