function flatten (array) {
  return NdArray.new(array).flatten();
}
Return a copy of the array collapsed into one dimension using row-major order (C-style)
@param {(Array|NdArray)} array
@returns {NdArray}