Get all array elements with true values in Julia | Array findall() Method Last Updated : 23 Mar, 2020 Comments Improve Suggest changes Like Article Like Report The findall() is an inbuilt function in julia which is used to return a vector of indices or keys of the all true values from the specified array A. If such true values are not present in the array, return an empty 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: findall(A) or findall(f::Function, A) Parameters: A: Specified array Function: Determines whether something is true or false based on the specified arguments Returns: It returns a vector of indices or keys of the all true values from the specified array A. If such true values are not present in the array, return an empty array. Example 1: Python # Julia program to illustrate # the use of Array findall() method # Finding index of all true values from # the 1D array A A = [false, true, true, false] println(findall(A)) # Finding index of all true values from # the 2D array B of size 2 * 2 B = [false false; true false] println(findall(B)) # Finding index of all true values from # the 3D array C of size 2 * 2*2 C = cat([false false; true false], [false true; true false], [true false; true true], dims = 3) println(findall(C)) Output: Example 2: Python # Julia program to illustrate # the use of Array findall() method # Finding index of all even values from # the 1D array A A = [1, 2, 5, 7] println(findall(iseven, A)) # Finding index of all odd values from # the 2D array B of size 2 * 2 B = [3 5; 6 7] println(findall(isodd, B)) # Finding index of all odd values from # the 3D array C of size 2 * 2*2 C = cat([6 2; 6 4], [5 6; 2 8], [2 10; 11 1], dims = 3) println(findall(isodd, C)) Output: Comment More infoAdvertise with us Next Article Get all array elements with true values in Julia | Array findall() Method 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