Answers for "np fill"

1

fill np array with same value

an_array = np.full((3, 5), 8)
Posted by: Guest on June-17-2020
0

np.full

>>> np.full((2, 2), np.inf)
array([[inf, inf],
       [inf, inf]])
>>> np.full((2, 2), 10)
array([[10, 10],
       [10, 10]])
Posted by: Guest on May-17-2020

Python Answers by Framework

Browse Popular Code Answers by Language