Getting minimum elements in Julia - minimum() and minimum!() Methods Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report The minimum() is an inbuilt function in julia which is used to return minimum elements in different scenario. Syntax: minimum(f, itr) or minimum(itr) or minimum(A::AbstractArray; dims) Parameters: f: Specified function.itr: Specified list of elements.A::AbstractArray: Specified array of different dimensions.dims: Specified dimensions. Returns: It returns the minimum elements in different scenario. Example: Julia # Julia program to illustrate # the use of minimum() method # Getting minimum elements in different scenarios # In the below scenario, length function # and a list of elements are used as # parameter. Here the length of string with # minimum alphabets will be returned println(minimum(length, ["GFG", "Geeks", "GeeksforGeeks"])) # In the below scenario, a list of # elements are shown and minimum elements are # returned as output println(minimum([5, 10, 15, 20])) # Getting the minimum value of an array # over the given dimensions A = [5 10; 15 20]; println(minimum(A, dims = 1)) println(minimum(A, dims = 2)) Output: minimum!() The minimum!() is an inbuilt function in julia which is used to calculate the minimum value of the specified array over the specified singleton dimensions. Syntax: minimum!(r, A)Parameters: r: Specified singleton dimensions.A: Specified array. Returns: It returns the minimum value of the specified array over the specified singleton dimensions. Example: Julia # Julia program to illustrate # the use of minimum !() method # Getting the minimum value of the # specified array over the specified # singleton dimensions. A = [5 10; 15 20]; println(minimum !([1; 1], A)) println(minimum !([1 1], A)) Output: [5, 15] [5 10] Comment More infoAdvertise with us Next Article Getting minimum elements in Julia - minimum() and minimum!() Methods K Kanchan_Ray Follow Improve Article Tags : Julia Similar Reads Getting maximum elements in Julia - maximum() and maximum!() Methods The maximum() is an inbuilt function in julia which is used to return maximum elements in different scenario. Syntax: maximum(f, itr) or maximum(itr) or maximum(A::AbstractArray; dims) Parameters: f: Specified function.itr: Specified list of elements.A::AbstractArray: Specified array of different d 2 min read Getting the minimum value from a list in Julia - min() Method The min() is an inbuilt function in julia which is used to return the minimum value of the parameters. Syntax: min(x, y, ...) Parameters: x: Specified 1st value. y: Specified 2nd value and so on. Returns: It returns the minimum value of the parameters. Example 1: Python # Julia program to illustrate 1 min read Getting minimum element along with its index in Julia - findmin() Method The findmin() is an inbuilt function in julia which is used to return the minimum element of the specified collection along with its index. If there are multiple minimal elements are present in the collection, then the first one will be returned. If there is any data element is NaN, this element is 1 min read Getting union of sets in Julia - union() and union!() Methods The union() is an inbuilt function in julia which is used to construct the union of the specified sets. Syntax: union(s, itrs...) Parameters: s: Specified first set. itrs: Specified second set. Returns: It returns the constructed union of the specified sets. Example: Python # Julia program to illust 2 min read Getting first and last set of elements in Julia - front() and tail() Methods The front() is an inbuilt function in julia which is used to return a tuple consisting of all but the last component of x, where x is the specified tuple. Syntax: front(x::Tuple)::Tuple Parameters: x::Tuple: Specified tuple. Returns: It returns a tuple consisting of all but the last component of x, 2 min read Like