function softmax (x) {
  var e = NdArray.new(x).exp();
  var se = e.sum(); // scalar
  ops.divseq(e.selection, se);
  return e;
}
Return the softmax, or normalized exponential, of the input array, element-wise.
@param {(Array|NdArray|number)} x
@returns {NdArray}