static argsort(array, ascending = true) {
    let order
    if (ascending) {
      order = 1
    } else {
      order = -1
    }

    return array
      .map(function(value, index) { return [value, index] })
      .sort(function(vi1, vi2) { return order * (vi1[0] - vi2[0]) })
      .map(function(vi) { return vi[1] })
  }
Returns sorted indices of input

https://stackoverflow.com/questions/46622486/what-is-the-javascript-equivalent-of-numpy-argsort
@param {Array}
@return {Array}