Initializing NumPy Array Functions Zeros(), Ones(), Full(), Eye()
Machine Learning courses with 100+ Real-time projects Start Now!!
Program 1
import numpy as np
ar=np.arange(1,11,1)
# r=int(input("Enter value of row"))
# c=int(input("Enter value of column"))
# ar=np.zeros((r,c),dtype=int)
#print(ar)
# ar=np.ones((3,4),dtype=int)
# print(ar)
# r=int(input("Enter value of row"))
# c=int(input("Enter value of column"))
# n=(input("Enter a number for full array"))
# ar=np.full((r,c),n)
# print(ar)
# ar=np.eye(5,dtype=int)
# print(ar)
Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

