Reshaping array dimensions in Julia | Array reshape() Method Last Updated : 23 Mar, 2020 Comments Improve Suggest changes Like Article Like Report 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 as the specified array, but with different specified dimension sizes. Example 1: Python # Julia program to illustrate # the use of Array reshape() method # Getting an array with the same data # as the specified 1D array, but with # (2 * 2) dimension sizes. A = [1, 2, 3, 4]; println(reshape(A, (2, 2))) # Getting an array with the same data # as the specified 2D array, but with # (4 * 4) dimension sizes. B = [1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16]; println(reshape(B, (4, 4))) # Getting an array with the same data # as the specified 2D array, but with # (2 * 8) dimension sizes. C = [1 5 9 13; 2 6 10 14; 3 7 11 15; 4 8 12 16]; println(reshape(C, 2, :)) Output: Example 2: Python # Julia program to illustrate # the use of Array reshape() method # Getting an array with the same data # as the specified 1D array, but with # (2 * 2) dimension sizes. A = ["a", "b", "c", "d"]; println(reshape(A, (2, 2))) # Getting an array with the same data # as the specified 2D array, but with # (2 * 2) dimension sizes. B = ["a" "b"; "c" "d"]; println(reshape(B, (2, 2))) # Getting an array with the same data # as the specified 3D array, but with # (2 * 2*3) dimension sizes. C = cat(["a" "b"; "c" "d"], ["e" "f"; "g" "h"], ["i" "j"; "k" "l"], dims = 3); println(reshape(C, (2, 2, 3))) Output: Comment More infoAdvertise with us K Kanchan_Ray Follow Improve Article Tags : Julia Julia Array-functions Similar Reads Learn Free Programming Languages In this rapidly growing world, programming languages are also rapidly expanding, and it is very hard to determine the exact number of programming languages. Programming languages are an essential part of software development because they create a communication bridge between humans and computers. No 9 min read For loop in Julia For loops are used to iterate over a set of values and perform a set of operations that are given in the body of the loop. For loops are used for sequential traversal. In Julia, there is no C style for loop, i.e., for (i = 0; i Syntax: for iterator in range statements(s) end Here, 'for' is the keywo 2 min read Julia Dictionary Dictionary in Julia is a collection of key-value pairs, where each value in the dictionary can be accessed with its key. These key-value pairs need not be of the same data type, which means a String typed key can hold a value of any type like Integer, String, float, etc. Keys of a dictionary can nev 7 min read Vectors in Julia Vectors in Julia are a collection of elements just like other collections like Array, Sets, Dictionaries, etc. Vector are different from Sets because vectors are ordered collections of elements, and can hold duplicate values, unlike sets which require all the elements to be unique. Vectors are one-d 5 min read Printing Output on Screen in Julia Julia provides many methods of printing output on the screen. The Julia program starts with an interactive REPL (Read/ Evaluate /Print / Loop) as default. R: Reads what was typed;E: Evaluates the typed expression;P: Prints the return value;L: Loops back and repeats it ; It helps in outputting the r 3 min read String concatenation in Julia String concatenation in Julia is a way of appending two or more strings into a single string whether it is character by character or using some special characters end to end. There are many ways to perform string concatenation. Example: Input: str1 = 'Geeks' str2 = 'for' str3 = 'Geeks' Output: 'Gee 2 min read Opening and Reading a File in Julia File handling in Julia is achieved using functions such as open(), read(), and close(). There are many ways to read the contents of a file like readline(), readlines() and just read(). open(): To open a file existing in an absolute path, provided as the parameter.  read(): Read the contents of the f 4 min read Julia Language Introduction Julia is a high-level open-source programming language, developed by a group of 4 people at MIT. Julia is a dynamic, high-performance programming language that is used to perform operations in scientific computing. Similar to R Programming Language, Julia is used for statistical computations and dat 4 min read Arrays in Julia Arrays in Julia are a collection of elements just like other collections like Sets, Dictionaries, etc. Arrays are different from Sets because arrays are ordered collection of elements, and can hold duplicate values, unlike sets which require all the elements to be unique. Arrays are N-Dimensional co 13 min read Operators in Julia Operators in Julia are the mathematical symbols that are used to perform operations on variables and values. These symbols are used to carry out arithmetic and logical computations. Variables on which the operators perform operations are termed as Operands. In other words, we can say that an operato 9 min read Like