Check whether two arrays are element-wise equal using NumPy.

In this python numpy program, we will check whether two arrays are element-wise equal using NumPy.

Steps to solve the program
  1. Import the numpy library as np.
  2. Create two arrays using np.array().
  3. Check whether two arrays are element-wise equal using equal to sign ( == ).
  4. Print the output.
				
					import numpy as np
x = np.array([5, 3])
y = np.array([7,4])

print("Is two arrays element wise equal? : ",x == y)
				
			

Output :

				
					Is two arrays element wise equal? :  [False False]
				
			

find the missing data in a given array.

create a one-dimensional array.

Leave a Comment