Q. Write a program to extract and display all even values from a 1D array.


Answer :-

import numpy as np 
arr = np.array(range(1, 100)) 
print("Even number ", arr[arr%2 == 0]) 

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post