pandas and NumPy 3 · NumPy

Create filled arrays

Create arrays of zeros, ones or a given value.

np.zeros((3, 4))
np.ones(5)
np.full((2, 2), 7)

Official pandas and NumPy 3 documentation

More numpy commands

All numpy commands · pandas and NumPy 3 cheatsheet

Was this page helpful?