Get array dimensions and size of a dimension in Julia - size() Method Last Updated : 26 Mar, 2020 Comments Improve Suggest changes Like Article Like Report The size() is an inbuilt function in julia which is used to return a tuple containing the dimensions of the specified array. This returned tuple format is (a, b, c) where a is the rows, b is the columns and c is the height of the array. Syntax: size(A::AbstractArray) or size(A::AbstractArray, Dim) Parameters: A: Specified array Dim: Specified dimension Returns: It returns a tuple containing the dimensions of the specified array. Example 1: Python # Julia program to illustrate # the use of Array size() method # Finding a tuple containing the dimension of # the specified 1D array A. A = [5, 10, 15, 20] println(size(A)) # Finding a tuple containing the dimension of # the specified 2D array B of size 2*2 B = [5 10; 15 20] println(size(B)) # Finding a tuple containing the dimension of # the specified 3D array C of size 2*2*2 C = cat([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], dims=3) println(size(C)) Output: Example 2: Python # Julia program to illustrate # the use of Array size() method # Finding a tuple containing the dimension of # the specified 1D array A. A = [1, 2, 3]; println(size(A, 3)) # Finding a tuple containing the dimension of # the specified 2D array B of size 3*2 B = [2 4; 6 8; 10 12]; println(size(B, 2)) # Finding a tuple containing the dimension of # the specified 3D array C of size 2*2*4 C = cat([10 15; 20 25], [30 35; 40 45], [50 55; 60 65], [70 75; 80 85], dims=3); println(size(C, 2)) Output: Comment More infoAdvertise with us Next Article Get array dimensions and size of a dimension in Julia - size() Method K Kanchan_Ray Follow Improve Article Tags : Julia Similar Reads Representing the dimensions of array in Julia - Dims() Method The Dims() is an inbuilt function in julia which is used to represent the dimensions of the specified AbstractArray. Syntax: Dims(A) Parameters: A: Specified array Returns: It returns the represented dimensions of the specified AbstractArray. Example 1: Python # Julia program to illustrate # the use 1 min read Get dimensions of array in Julia - ndims() Method The ndims() is an inbuilt function in julia which is used to return the number of dimension of the specified array A. Syntax: ndims(A::AbstractArray) Parameters: A: Specified array Returns: It returns the number of dimension of the specified array A. Example 1: Python # Julia program to illustrate # 1 min read Reshaping array dimensions in Julia | Array reshape() Method The reshape() is an inbuilt function in julia which is used to return an array with the same data as the specified array, but with different specified dimension sizes. Syntax: reshape(A, dims) Parameters: A: Specified array. dims: Specified dimension. Returns: It returns an array with the same data 2 min read Getting first element of an array in Julia - first() Method The first() is an inbuilt function in julia which is used to return the first element of the specified iterable collection. Syntax: first(coll) Parameters: coll: Specified iterable collection. Returns: It returns the first element of the specified iterable collection. Example 1: Python # Julia progr 1 min read Get index of first true value of array in Julia | Array findfirst() Method The findfirst() is an inbuilt function in julia which is used to return the index or key of the first true value in the specified array. Here values of index or key start from 1 i.e, for index of 1st element is 1, index of 2nd element is 2 and so on. Syntax: findfirst(A) or findfirst(predicate::Func 2 min read Like