1.0.2 • Published 3 years ago

ml-array-xy-centroids-merge v1.0.2

Weekly downloads
133
License
MIT
Repository
github
Last release
3 years ago

array-xy-centroids-merge

NPM version npm download

Merge abscissa values if the ordinate value is in a list of centroids.

Installation

$ npm install --save ml-array-xy-ranges-merge

Usage

import mergeByCentroids from 'ml-array-xy-centroids-merge';

const originalPoints = {
  x: [0.01, 1.008, 1.01, 1.012, 1.02, 1.04],
  y: [1, 1, 1, 1, 1, 1]
};

mergeByCentroids(originalPoints, [1.01, 1.04]);

/* result -> {
    x: [1.01, 1.04],
    y: [3, 1]
} */

License

MIT

1.0.2

3 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.5

5 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago