Let’s see how to generate array filled with value in Numpy Python library.
Numpy full
To generate Numpy value and populate it in the beginning with given fill value you should use numpy.full function.
import numpy as np fill_array = np.full(shape=(3, 4), fill_value='my_fav_value') print(fill_array)
Numpy full function needs two arguments which do not have default value: