0

Find the first and last element of the array that are equal or larger than a value without sorting?

Import numpy as np a = np.array([2, 1 , 3 , 6, 4, 3, 6,1]) I want to find the first number that is equal or larger than 3 and the last number that is equal or larger than 3 without sorting.

14th Jul 2021, 5:29 PM
Karzan
1 Resposta
0
With a for loop
27th Sep 2021, 5:30 AM
Cristian Baeza Jimenez
Cristian Baeza Jimenez - avatar