numpy.full () in Python

numpy.full (shape, fill_value, dtype = None, order = & # 39; C & # 39;): return a new array with the same shape and type as the given array, filled fill_value. 
Parameters :

  shape:  Number of rows  order:  C_contiguous or F_contiguous  dtype:  [optional, float (by Default)] Data type of returned array.  fill_value:  [bool, optional] Value to fill in the array. 

Returns :

 ndarray 

# Python Programming Illustrative
# numpy.full method

 

import numpy as geek

 

a = geek.full ([ 2 , 2 ], 67 , dtype = int )

print ( "Matrix a:" , a)

  

c = geek.full ([ 3 , 3 ], 10.1 )

print ( "Matrix c:" , c)

Output:

 Matrix a: [[67 67] [67 67]] Matrix c: [[10.1 10.1 10.1] [10.1 10.1 10.1] [10.1 10.1 10.1]] 

Links:
https://docs.scipy. org / doc / numpy / reference / generated / numpy.full.html # numpy.full
Notes:
These NumPy-Python programs will not work by onlineID so run them on your systems so to learn them
,
This article is provided by Mohit Gupta_OMG