Get dimensions of array in Julia - ndims() Method Last Updated : 26 Mar, 2020 Comments Improve Suggest changes Like Article Like Report 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 # the use of Array ndims() method # Finding the number of dimension of # the specified array A. A = fill(1, 3); println(ndims(A)) # Finding the number of dimension of # the specified array B. B = fill(1, (3, 3)); println(ndims(B)) # Finding the number of dimension of # the specified array C. C = fill(1, (3, 1, 2)); println(ndims(C)) Output: Example 2: Python # Julia program to illustrate # the use of Array ndims() method # Finding the number of dimension of # the specified array A. A = fill(1, 2, 3, 4); println(ndims(A)) # Finding the number of dimension of # the specified array B. B = fill((5, 10), (3, 3)); println(ndims(B)) # Finding the number of dimension of # the specified array C. C = fill((5, 10, 15), (3, 1, 2)); println(ndims(C)) Output: Comment More infoAdvertise with us Next Article Get dimensions of array in Julia - ndims() Method K Kanchan_Ray Follow Improve Article Tags : Julia Similar Reads Get number of elements of array in Julia - length() Method The length() is an inbuilt function in julia which is used to return the number of elements present in the specified array. Syntax: length(A::AbstractArray) Parameters: A: Specified array Returns: It returns the number of elements present in the specified array. Example 1: Python # Julia program to 2 min read 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 array dimensions and size of a dimension in Julia - size() Method 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) P 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 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 Like