functions are new additions to NumPy meant to facilitate initialization. Here's what the documentation says about them:
>>> help(np.full) Return a new array of given shape and type, filled with `fill_value`. >>> help(np.full_like) Return a full array with the same shape and type as a given array.
Let's see how
full(), filled with the lucky number
print(np.full((1, 2), 7))
Accordingly, we get the following array:
array([[ 7., 7.]])
The array elements are floating-point numbers.
print(np.full((1, 2), 7, dtype=np.int))
The output changes ...