Answers for "select a range in an array python"

1

select certain element from ndarray python

# arr = [elements]
# new_arr = arr[condition]  
# new_arr = [lements satisfying condition]
arr = [3, 6, 5, 9, 4, 12, 1]
new_arr = arr[arr%2 == 0]
new_arr = [6, 4, 12]
Posted by: Guest on June-16-2020

Code answers related to "select a range in an array python"

Python Answers by Framework

Browse Popular Code Answers by Language