Package Exports
- ml-arrayxy-uniquex
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-arrayxy-uniquex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
arrayxy-uniquex
Function to sum the y values if the x values are equals. The x array has to be ordered. It is an in place modification
Installation
npm i ml-arrayxy-uniquex
const uniqueX=require('ml-arrayxy-uniquex');
var x = [0, 0, 1, 2, 3, 3];
var y = [1, 2, 3, 4, 5, 6];
uniqueX({ x, y });
// x = [0, 1, 2, 3]
// y = [3, 3, 4, 11]