check odd numbers numpy

Solutions on MaxInterview for check odd numbers numpy by the best coders in the world

showing results for - "check odd numbers numpy"
Liam
07 Sep 2017
1# Input
2arr = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
3arr[arr % 2 == 1]
4#> array([1, 3, 5, 7, 9])
5