Max of a vector

“Maximum argument” makes me think you mean argmax which would be maxloc in Fortran.

GNU Fortran documentation:

  • max - maximum value of argument list
  • maxval - maximum value of an array
  • maxloc - Location of the maximum value within an array

In Julia, the corresponding functions are,

  • max - Return the maximum of the arguments (with respect to isless)
  • maximum - Return the largest element in a collection, iterator, or array
  • argmax - Return the index or key of the maximal element in a collection.

That said we are about 10 years too late on this conversation:

This is not going to change in Base Julia. Julia is not at that stage of development where we can change this kind of surface naming.

I can tell you how to create your own aliases or even not load Base symbols into your current namespace if you would like.

julia> const maxval = Base.maximum

Or

baremodule Foo
    using Base: max, argmax
    const maxval = Base.maximum
end
3 Likes