0
Q:

np.full

import numpy as np

# Creates a 5x5 2d matrix with values True
output = np.full((5,5), True)
# Proof
print(output)
#[[ True  True  True  True  True]
# [ True  True  True  True  True]
# [ True  True  True  True  True]
# [ True  True  True  True  True]
# [ True  True  True  True  True]]
0
>>> np.full((2, 2), np.inf)
array([[inf, inf],
       [inf, inf]])
>>> np.full((2, 2), 10)
array([[10, 10],
       [10, 10]])
0

New to Communities?

Join the community