JSPM

ml-array-xy-centroids-merge

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

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

Package Exports

  • ml-array-xy-centroids-merge

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 (ml-array-xy-centroids-merge) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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