![]() |
VOOZH | about |
In this type of question, a number is given and we have to find the position or index of all multiples of that number. For doing this question we use a function named numpy.argwhere().
Syntax:
numpy.argwhere(array)
Example 1:
Sometimes we need to find the indexes of the element that are divisible by int or float number.
Output:
👁 ImageIn the above example, we find the indexes of all numbers divisible by 3.
Example 2:
Output:
👁 ImageIn the above example, we find the indexes of all numbers divisible by floating-point number 3.5