<commit_before>lpnorm
===
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]

> Computes the [_Lp_ norm](http://en.wikipedia.org/wiki/Norm_(mathematics)) of an array of values.


## Installation

``` bash
$ npm install compute-lpnorm
```

For use in the browser, use [browserify](https://github.com/substack/node-browserify).


## Usage

To use the module,

``` javascript
var lpnorm = require( 'compute-lpnorm' );
```

#### lpnorm( arr[, p] )

Computes the _p_-norm of an `array`, where `p` is an `integer` greater than `0`.

``` javascript
var data = [ 3, 1, 9, 4, 4, 2 ];

var len = lpnorm( data, 2 );
// returns 
```

The default value of `p` is `2` (Euclidean norm).


#### Special Cases

When `p = 1`, the norm is the `L1`, or so-called [Taxicab norm](http://en.wikipedia.org/wiki/Norm_(mathematics)).

When `p = 2`, the norm is the `L2`, or [Euclidean norm](http://en.wikipedia.org/wiki/Norm_(mathematics)).

When `p = infinity`, the norm is the [maximum norm](http://en.wikipedia.org/wiki/Norm_(mathematics)).
<commit_msg>[UPDATE] README.<commit_after>lpnorm
===
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]

> Computes the [_Lp_ norm](http://en.wikipedia.org/wiki/Norm_(mathematics)) of an array of values.


## Installation

``` bash
$ npm install compute-lpnorm
```

For use in the browser, use [browserify](https://github.com/substack/node-browserify).


## Usage

To use the module,

``` javascript
var lpnorm = require( 'compute-lpnorm' );
```

#### lpnorm( arr[, p] )

Computes the _p_-norm of an `array`, where `p` is an `integer` greater than `0`.

``` javascript
var data = [ 3, 1, 9, 4, 4, 2 ];

var len = lpnorm( data, 2 );
// returns 
```

The default value of `p` is `2` (Euclidean norm).


#### Special Cases

* `p = 1`: the norm is the `L1`, or so-called [Taxicab norm](http://en.wikipedia.org/wiki/Norm_(mathematics)).

* `p = 2`: the norm is the `L2`, or [Euclidean norm](http://en.wikipedia.org/wiki/Norm_(mathematics)).

* `p = infinity`: the norm is the [maximum norm](http://en.wikipedia.org/wiki/Norm_(mathematics)).

{'fraction_non_alphanumeric': 0.1895368782161235, 'fraction_numerical': 0.011149228130360206, 'mean_word_length': 4.515366430260047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1606626', 'n_tokens_mistral': 890, 'n_tokens_neox': 803, 'n_words': 226}