# Full() in Numpy python by R4R Team

- full() is a python Numpy method which are create a new matrix by required order or it's all elements are same.
- It take shape,value as a argument and return a matrix.

Syntax-

numpy.full(shape,value)

Example-

numpy.full((2,2),3) will return
[[3 3]
[3 3]]

program-

#import numpy
import numpy as np

print("Matrix of order 2x2 contain value 3 is")
print(np.full((2,2),3))

print("Matrix of order 2x2 contain value (3,4) is")
print(np.full((2,2),(3,4)))

print("Matrix of order 3x3 contain value a is")
print(np.full((3,3),'a'))

output-

Matrix of order 2x2 contain value 3 is
[[3 3]
[3 3]]
Matrix of order 2x2 contain value (3,4) is
[[3 4]
[3 4]]
Matrix of order 3x3 contain value a is
[['a' 'a' 'a']
['a' 'a' 'a']
['a' 'a' 'a']]

-In this program, we create a different matrix's by using full() method in Numpy.

##### R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!