Program to create a one-dimensional array using NumPy.

In this python numpy program, we will create a one-dimensional array using NumPy.

Steps to solve the program
  1. Import the numpy library as np.
  2. Create a one-dimensional array using np.array().
  3. Print the output.
				
					import numpy as np
x = np.array([65,90,1,3,5])

print(x)
				
			

Output :

				
					[65 90  1  3  5]
				
			

check whether two arrays are element-wise equal.

interchange the rows of a matrix.

Leave a Comment